Changeset 156490 in webkit
- Timestamp:
- Sep 26, 2013 1:27:14 PM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 deleted
- 29 edited
- 7 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/CMakeLists.txt
r156300 r156490 151 151 dfg/DFGPredictionInjectionPhase.cpp 152 152 dfg/DFGPredictionPropagationPhase.cpp 153 dfg/DFGRepatch.cpp154 153 dfg/DFGSSAConversionPhase.cpp 155 154 dfg/DFGSpeculativeJIT.cpp … … 226 225 jit/JITOpcodes.cpp 227 226 jit/JITOpcodes32_64.cpp 227 jit/JITOperations.cpp 228 228 jit/JITPropertyAccess.cpp 229 229 jit/JITPropertyAccess32_64.cpp … … 233 233 jit/JITToDFGDeferredCompilationCallback.cpp 234 234 jit/JumpReplacementWatchpoint.cpp 235 jit/Repatch.cpp 235 236 jit/ThunkGenerators.cpp 236 237 -
trunk/Source/JavaScriptCore/ChangeLog
r156489 r156490 1 2013-09-26 Mark Lam <mark.lam@apple.com> 2 3 Move DFG inline caching logic into jit/. 4 https://bugs.webkit.org/show_bug.cgi?id=121749. 5 6 Reviewed by Geoffrey Garen. 7 8 Relanding http://trac.webkit.org/changeset/156235 after rebasing to latest 9 revision and fixing build breakages on Windows. 10 11 * CMakeLists.txt: 12 * GNUmakefile.list.am: 13 * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: 14 * JavaScriptCore.xcodeproj/project.pbxproj: 15 * Target.pri: 16 * bytecode/CallLinkInfo.cpp: 17 (JSC::CallLinkInfo::unlink): 18 * bytecode/CodeBlock.cpp: 19 (JSC::CodeBlock::resetStubInternal): 20 * bytecode/StructureStubInfo.h: 21 * dfg/DFGCallArrayAllocatorSlowPathGenerator.h: 22 (JSC::DFG::CallArrayAllocatorSlowPathGenerator::CallArrayAllocatorSlowPathGenerator): 23 (JSC::DFG::CallArrayAllocatorWithVariableSizeSlowPathGenerator::CallArrayAllocatorWithVariableSizeSlowPathGenerator): 24 * dfg/DFGJITCompiler.h: 25 * dfg/DFGOSRExitCompiler.h: 26 * dfg/DFGOperations.cpp: 27 (JSC::DFG::operationPutByValInternal): 28 * dfg/DFGOperations.h: 29 (JSC::DFG::operationNewTypedArrayWithSizeForType): 30 (JSC::DFG::operationNewTypedArrayWithOneArgumentForType): 31 * dfg/DFGRegisterSet.h: Removed. 32 * dfg/DFGRepatch.cpp: Removed. 33 * dfg/DFGRepatch.h: Removed. 34 * dfg/DFGScratchRegisterAllocator.h: Removed. 35 * dfg/DFGSpeculativeJIT.cpp: 36 (JSC::DFG::SpeculativeJIT::nonSpeculativeCompare): 37 (JSC::DFG::SpeculativeJIT::compilePeepHoleBranch): 38 (JSC::DFG::SpeculativeJIT::compare): 39 * dfg/DFGSpeculativeJIT.h: 40 (JSC::DFG::SpeculativeJIT::callOperation): 41 * dfg/DFGSpeculativeJIT32_64.cpp: 42 (JSC::DFG::SpeculativeJIT::cachedPutById): 43 (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch): 44 (JSC::DFG::CompareAndBoxBooleanSlowPathGenerator::CompareAndBoxBooleanSlowPathGenerator): 45 (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare): 46 (JSC::DFG::SpeculativeJIT::compile): 47 * dfg/DFGSpeculativeJIT64.cpp: 48 (JSC::DFG::SpeculativeJIT::cachedPutById): 49 (JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch): 50 (JSC::DFG::CompareAndBoxBooleanSlowPathGenerator::CompareAndBoxBooleanSlowPathGenerator): 51 (JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare): 52 (JSC::DFG::SpeculativeJIT::compile): 53 * dfg/DFGThunks.cpp: 54 * dfg/DFGThunks.h: 55 * ftl/FTLIntrinsicRepository.h: 56 * ftl/FTLLowerDFGToLLVM.cpp: 57 (JSC::FTL::LowerDFGToLLVM::compileCallOrConstruct): 58 * ftl/FTLOSRExitCompiler.h: 59 * jit/AssemblyHelpers.h: 60 (JSC::AssemblyHelpers::writeBarrier): 61 * jit/JIT.cpp: 62 (JSC::JIT::linkFor): 63 (JSC::JIT::linkSlowCall): 64 * jit/JITCall.cpp: 65 (JSC::JIT::compileCallEvalSlowCase): 66 (JSC::JIT::compileOpCallSlowCase): 67 (JSC::JIT::privateCompileClosureCall): 68 * jit/JITCall32_64.cpp: 69 (JSC::JIT::compileCallEvalSlowCase): 70 (JSC::JIT::compileOpCallSlowCase): 71 (JSC::JIT::privateCompileClosureCall): 72 * jit/JITOperationWrappers.h: Copied from Source/JavaScriptCore/jit/JITOperationWrappers.h. 73 * jit/JITOperations.cpp: Copied from Source/JavaScriptCore/jit/JITOperations.cpp. 74 (JSC::getHostCallReturnValueWithExecState): 75 * jit/JITOperations.h: Copied from Source/JavaScriptCore/jit/JITOperations.h. 76 * jit/RegisterSet.h: Copied from Source/JavaScriptCore/jit/RegisterSet.h. 77 * jit/Repatch.cpp: Copied from Source/JavaScriptCore/jit/Repatch.cpp. 78 (JSC::tryBuildGetByIDList): 79 * jit/Repatch.h: Copied from Source/JavaScriptCore/jit/Repatch.h. 80 * jit/ScratchRegisterAllocator.h: Copied from Source/JavaScriptCore/jit/ScratchRegisterAllocator.h. 81 * jit/ThunkGenerators.cpp: 82 (JSC::oldStyleGenerateSlowCaseFor): 83 (JSC::oldStyleLinkForGenerator): 84 (JSC::oldStyleLinkCallGenerator): 85 (JSC::oldStyleLinkConstructGenerator): 86 (JSC::oldStyleLinkClosureCallGenerator): 87 (JSC::oldStyleVirtualForGenerator): 88 (JSC::oldStyleVirtualCallGenerator): 89 (JSC::oldStyleVirtualConstructGenerator): 90 (JSC::emitPointerValidation): 91 (JSC::throwExceptionFromCallSlowPathGenerator): 92 (JSC::slowPathFor): 93 (JSC::linkForThunkGenerator): 94 (JSC::linkCallThunkGenerator): 95 (JSC::linkConstructThunkGenerator): 96 (JSC::linkClosureCallThunkGenerator): 97 (JSC::virtualForThunkGenerator): 98 (JSC::virtualCallThunkGenerator): 99 (JSC::virtualConstructThunkGenerator): 100 * jit/ThunkGenerators.h: 101 1 102 2013-09-26 Anders Carlsson <andersca@apple.com> 2 103 -
trunk/Source/JavaScriptCore/GNUmakefile.list.am
r156489 r156490 340 340 Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.h \ 341 341 Source/JavaScriptCore/dfg/DFGRegisterBank.h \ 342 Source/JavaScriptCore/dfg/DFGRegisterSet.h \343 Source/JavaScriptCore/dfg/DFGRepatch.cpp \344 Source/JavaScriptCore/dfg/DFGRepatch.h \345 342 Source/JavaScriptCore/dfg/DFGSafeToExecute.h \ 346 343 Source/JavaScriptCore/dfg/DFGSaneStringGetByValSlowPathGenerator.h \ 347 344 Source/JavaScriptCore/dfg/DFGScoreBoard.h \ 348 Source/JavaScriptCore/dfg/DFGScratchRegisterAllocator.h \349 345 Source/JavaScriptCore/dfg/DFGSilentRegisterSavePlan.h \ 350 346 Source/JavaScriptCore/dfg/DFGSlowPathGenerator.h \ … … 632 628 Source/JavaScriptCore/jit/JITOpcodes32_64.cpp \ 633 629 Source/JavaScriptCore/jit/JITOpcodes.cpp \ 630 Source/JavaScriptCore/jit/JITOperationWrappers.h \ 631 Source/JavaScriptCore/jit/JITOperations.cpp \ 632 Source/JavaScriptCore/jit/JITOperations.h \ 634 633 Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp \ 635 634 Source/JavaScriptCore/jit/JITPropertyAccess.cpp \ … … 654 653 Source/JavaScriptCore/jit/JumpReplacementWatchpoint.cpp \ 655 654 Source/JavaScriptCore/jit/JumpReplacementWatchpoint.h \ 655 Source/JavaScriptCore/jit/Repatch.cpp \ 656 Source/JavaScriptCore/jit/Repatch.h \ 657 Source/JavaScriptCore/jit/ScratchRegisterAllocator.h \ 656 658 Source/JavaScriptCore/jit/SlowPathCall.h \ 657 659 Source/JavaScriptCore/jit/SpecializedThunkJIT.h \ -
trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj
r156489 r156490 379 379 <ClCompile Include="..\jit\JITOpcodes.cpp" /> 380 380 <ClCompile Include="..\jit\JITOpcodes32_64.cpp" /> 381 <ClCompile Include="..\jit\JITOperations.cpp" /> 381 382 <ClCompile Include="..\jit\JITPropertyAccess.cpp" /> 382 383 <ClCompile Include="..\jit\JITPropertyAccess32_64.cpp" /> … … 386 387 <ClCompile Include="..\jit\JITToDFGDeferredCompilationCallback.cpp" /> 387 388 <ClCompile Include="..\jit\JumpReplacementWatchpoint.cpp" /> 389 <ClCompile Include="..\jit\Repatch.cpp" /> 388 390 <ClCompile Include="..\jit\ThunkGenerators.cpp" /> 389 391 <ClCompile Include="..\llint\LLIntCLoop.cpp" /> … … 769 771 <ClInclude Include="..\jit\JITExceptions.h" /> 770 772 <ClInclude Include="..\jit\JITInlines.h" /> 773 <ClInclude Include="..\jit\JITOperationWrappers.h" /> 774 <ClInclude Include="..\jit\JITOperations.h" /> 771 775 <ClInclude Include="..\jit\JITStubCall.h" /> 772 776 <ClInclude Include="..\jit\JITStubRoutine.h" /> … … 780 784 <ClInclude Include="..\jit\JSInterfaceJIT.h" /> 781 785 <ClInclude Include="..\jit\JumpReplacementWatchpoint.h" /> 786 <ClInclude Include="..\jit\RegisterSet.h" /> 787 <ClInclude Include="..\jit\Repatch.h" /> 788 <ClInclude Include="..\jit\ScratchRegisterAllocator.h" /> 782 789 <ClInclude Include="..\jit\SpecializedThunkJIT.h" /> 783 790 <ClInclude Include="..\jit\ThunkGenerator.h" /> -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r156489 r156490 121 121 0F24E55517F0B71C00ABB217 /* InlineCallFrameSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F24E55317F0B71C00ABB217 /* InlineCallFrameSet.cpp */; }; 122 122 0F24E55617F0B71C00ABB217 /* InlineCallFrameSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F24E55417F0B71C00ABB217 /* InlineCallFrameSet.h */; settings = {ATTRIBUTES = (Private, ); }; }; 123 0F24E54C17EE274900ABB217 /* JITOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F24E54517EE274900ABB217 /* JITOperations.cpp */; }; 124 0F24E54D17EE274900ABB217 /* JITOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F24E54617EE274900ABB217 /* JITOperations.h */; }; 125 0F24E54E17EE274900ABB217 /* JITOperationWrappers.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F24E54717EE274900ABB217 /* JITOperationWrappers.h */; }; 126 0F24E54F17EE274900ABB217 /* RegisterSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F24E54817EE274900ABB217 /* RegisterSet.h */; }; 127 0F24E55017EE274900ABB217 /* Repatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F24E54917EE274900ABB217 /* Repatch.cpp */; }; 128 0F24E55117EE274900ABB217 /* Repatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F24E54A17EE274900ABB217 /* Repatch.h */; }; 129 0F24E55217EE274900ABB217 /* ScratchRegisterAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F24E54B17EE274900ABB217 /* ScratchRegisterAllocator.h */; }; 123 130 0F256C361627B0AD007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F256C341627B0AA007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h */; settings = {ATTRIBUTES = (Private, ); }; }; 124 131 0F2B66AC17B6B53F00A7AE3F /* GCIncomingRefCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66A817B6B53D00A7AE3F /* GCIncomingRefCounted.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 267 274 0F766D3815AE4A1C008F363E /* StructureStubClearingWatchpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F766D3615AE4A1A008F363E /* StructureStubClearingWatchpoint.cpp */; }; 268 275 0F766D3915AE4A1F008F363E /* StructureStubClearingWatchpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F766D3715AE4A1A008F363E /* StructureStubClearingWatchpoint.h */; settings = {ATTRIBUTES = (Private, ); }; }; 269 0F766D4415B2A3C0008F363E /* DFGRegisterSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F766D4215B2A3BD008F363E /* DFGRegisterSet.h */; settings = {ATTRIBUTES = (Private, ); }; };270 0F766D4615B3701F008F363E /* DFGScratchRegisterAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F766D4515B3701D008F363E /* DFGScratchRegisterAllocator.h */; settings = {ATTRIBUTES = (Private, ); }; };271 276 0F7700921402FF3C0078EB39 /* SamplingCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F7700911402FF280078EB39 /* SamplingCounter.cpp */; }; 272 277 0F7B294B14C3CD2F007C3DB1 /* DFGCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD82E1F14172C2F00179C94 /* DFGCapabilities.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 731 736 86B5826714D2796C00A9C306 /* CodeProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86B5822E14D2373B00A9C306 /* CodeProfile.cpp */; }; 732 737 86B5826914D2797000A9C306 /* CodeProfiling.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8603CEF214C7546400AE59E3 /* CodeProfiling.cpp */; }; 733 86BB09C0138E381B0056702F /* DFGRepatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86BB09BE138E381B0056702F /* DFGRepatch.cpp */; };734 86BB09C1138E381B0056702F /* DFGRepatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 86BB09BF138E381B0056702F /* DFGRepatch.h */; settings = {ATTRIBUTES = (Private, ); }; };735 738 86C36EEA0EE1289D00B3DF59 /* MacroAssembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86C36EE90EE1289D00B3DF59 /* MacroAssembler.h */; settings = {ATTRIBUTES = (Private, ); }; }; 736 739 86C568E011A213EE0007F7F0 /* MacroAssemblerARM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86C568DD11A213EE0007F7F0 /* MacroAssemblerARM.cpp */; }; … … 1322 1325 0F24E55317F0B71C00ABB217 /* InlineCallFrameSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InlineCallFrameSet.cpp; sourceTree = "<group>"; }; 1323 1326 0F24E55417F0B71C00ABB217 /* InlineCallFrameSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InlineCallFrameSet.h; sourceTree = "<group>"; }; 1327 0F24E54517EE274900ABB217 /* JITOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JITOperations.cpp; sourceTree = "<group>"; }; 1328 0F24E54617EE274900ABB217 /* JITOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITOperations.h; sourceTree = "<group>"; }; 1329 0F24E54717EE274900ABB217 /* JITOperationWrappers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JITOperationWrappers.h; sourceTree = "<group>"; }; 1330 0F24E54817EE274900ABB217 /* RegisterSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterSet.h; sourceTree = "<group>"; }; 1331 0F24E54917EE274900ABB217 /* Repatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Repatch.cpp; sourceTree = "<group>"; }; 1332 0F24E54A17EE274900ABB217 /* Repatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Repatch.h; sourceTree = "<group>"; }; 1333 0F24E54B17EE274900ABB217 /* ScratchRegisterAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScratchRegisterAllocator.h; sourceTree = "<group>"; }; 1324 1334 0F256C341627B0AA007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGCallArrayAllocatorSlowPathGenerator.h; path = dfg/DFGCallArrayAllocatorSlowPathGenerator.h; sourceTree = "<group>"; }; 1325 1335 0F2B66A817B6B53D00A7AE3F /* GCIncomingRefCounted.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GCIncomingRefCounted.h; sourceTree = "<group>"; }; … … 1467 1477 0F766D3615AE4A1A008F363E /* StructureStubClearingWatchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StructureStubClearingWatchpoint.cpp; sourceTree = "<group>"; }; 1468 1478 0F766D3715AE4A1A008F363E /* StructureStubClearingWatchpoint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StructureStubClearingWatchpoint.h; sourceTree = "<group>"; }; 1469 0F766D4215B2A3BD008F363E /* DFGRegisterSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGRegisterSet.h; path = dfg/DFGRegisterSet.h; sourceTree = "<group>"; };1470 0F766D4515B3701D008F363E /* DFGScratchRegisterAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGScratchRegisterAllocator.h; path = dfg/DFGScratchRegisterAllocator.h; sourceTree = "<group>"; };1471 1479 0F77008E1402FDD60078EB39 /* SamplingCounter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SamplingCounter.h; sourceTree = "<group>"; }; 1472 1480 0F7700911402FF280078EB39 /* SamplingCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SamplingCounter.cpp; sourceTree = "<group>"; }; … … 1926 1934 86B5822F14D2373B00A9C306 /* CodeProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeProfile.h; sourceTree = "<group>"; }; 1927 1935 86B5826A14D35D5100A9C306 /* TieredMMapArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TieredMMapArray.h; sourceTree = "<group>"; }; 1928 86BB09BE138E381B0056702F /* DFGRepatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DFGRepatch.cpp; path = dfg/DFGRepatch.cpp; sourceTree = "<group>"; };1929 86BB09BF138E381B0056702F /* DFGRepatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGRepatch.h; path = dfg/DFGRepatch.h; sourceTree = "<group>"; };1930 1936 86BF642A148DB2B5004DE36A /* Intrinsic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Intrinsic.h; sourceTree = "<group>"; }; 1931 1937 86C36EE90EE1289D00B3DF59 /* MacroAssembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroAssembler.h; sourceTree = "<group>"; }; … … 2710 2716 0F24E53C17EA9F5900ABB217 /* AssemblyHelpers.h */, 2711 2717 0F24E53D17EA9F5900ABB217 /* CCallHelpers.h */, 2712 0F24E53E17EA9F5900ABB217 /* FPRInfo.h */,2713 0F24E53F17EA9F5900ABB217 /* GPRInfo.h */,2714 2718 0F73D7AB165A142A00ACAB71 /* ClosureCallStubRoutine.cpp */, 2715 2719 0F73D7AC165A142A00ACAB71 /* ClosureCallStubRoutine.h */, … … 2718 2722 A7B48DB50EE74CFC00DCBDB6 /* ExecutableAllocator.h */, 2719 2723 86DB64630F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp */, 2724 0F24E53E17EA9F5900ABB217 /* FPRInfo.h */, 2720 2725 0F766D2D15A8DCDD008F363E /* GCAwareJITStubRoutine.cpp */, 2721 2726 0F766D2E15A8DCDD008F363E /* GCAwareJITStubRoutine.h */, 2727 0F24E53F17EA9F5900ABB217 /* GPRInfo.h */, 2722 2728 0F4680D014BBC5F800BFE272 /* HostCallReturnValue.cpp */, 2723 2729 0F4680D114BBC5F800BFE272 /* HostCallReturnValue.h */, … … 2738 2744 BCDD51E90FB8DF74004A8BDC /* JITOpcodes.cpp */, 2739 2745 A71236E41195F33C00BD2174 /* JITOpcodes32_64.cpp */, 2746 0F24E54517EE274900ABB217 /* JITOperations.cpp */, 2747 0F24E54617EE274900ABB217 /* JITOperations.h */, 2748 0F24E54717EE274900ABB217 /* JITOperationWrappers.h */, 2740 2749 86CC85C30EE7A89400288682 /* JITPropertyAccess.cpp */, 2741 2750 A7C1E8C8112E701C00A37F98 /* JITPropertyAccess32_64.cpp */, … … 2760 2769 0F766D3215AE2535008F363E /* JumpReplacementWatchpoint.cpp */, 2761 2770 0F766D3315AE2535008F363E /* JumpReplacementWatchpoint.h */, 2771 0F24E54817EE274900ABB217 /* RegisterSet.h */, 2772 0F24E54917EE274900ABB217 /* Repatch.cpp */, 2773 0F24E54A17EE274900ABB217 /* Repatch.h */, 2774 0F24E54B17EE274900ABB217 /* ScratchRegisterAllocator.h */, 2762 2775 A709F2EF17A0AC0400512E98 /* SlowPathCall.h */, 2763 2776 A7386551118697B400540279 /* SpecializedThunkJIT.h */, … … 3616 3629 0FFFC95214EF909500C72532 /* DFGPredictionPropagationPhase.h */, 3617 3630 86EC9DC11328DF82002B2AD7 /* DFGRegisterBank.h */, 3618 0F766D4215B2A3BD008F363E /* DFGRegisterSet.h */,3619 86BB09BE138E381B0056702F /* DFGRepatch.cpp */,3620 86BB09BF138E381B0056702F /* DFGRepatch.h */,3621 3631 A77A423C17A0BBFD00A8DB81 /* DFGSafeToExecute.h */, 3622 3632 A741017E179DAF80002EB8BA /* DFGSaneStringGetByValSlowPathGenerator.h */, 3623 3633 86ECA3F9132DF25A002B2AD7 /* DFGScoreBoard.h */, 3624 0F766D4515B3701D008F363E /* DFGScratchRegisterAllocator.h */,3625 3634 0F1E3A65153A21DF000F9456 /* DFGSilentRegisterSavePlan.h */, 3626 3635 0F1E3A501537C2CB000F9456 /* DFGSlowPathGenerator.h */, … … 3950 3959 0FFB921816D02EB20055A5DB /* DFGAllocator.h in Headers */, 3951 3960 A737810C1799EA2E00817533 /* DFGAnalysis.h in Headers */, 3961 0F24E54E17EE274900ABB217 /* JITOperationWrappers.h in Headers */, 3952 3962 0F1E3A461534CBAF000F9456 /* DFGArgumentPosition.h in Headers */, 3953 3963 0F16015E156198C900C2587C /* DFGArgumentsSimplificationPhase.h in Headers */, … … 3960 3970 A70B083317A0B79B00DAF14B /* DFGBinarySwitch.h in Headers */, 3961 3971 A7D89CF417A0B8CC00773AD8 /* DFGBlockInsertionSet.h in Headers */, 3972 0F24E55217EE274900ABB217 /* ScratchRegisterAllocator.h in Headers */, 3962 3973 0F8364B7164B0C110053329A /* DFGBranchDirection.h in Headers */, 3963 3974 86EC9DC51328DF82002B2AD7 /* DFGByteCodeParser.h in Headers */, … … 4034 4045 0FFFC95E14EF90B700C72532 /* DFGPredictionPropagationPhase.h in Headers */, 4035 4046 86EC9DD11328DF82002B2AD7 /* DFGRegisterBank.h in Headers */, 4036 0F766D4415B2A3C0008F363E /* DFGRegisterSet.h in Headers */,4037 86BB09C1138E381B0056702F /* DFGRepatch.h in Headers */,4038 4047 2AD8932B17E3868F00668276 /* HeapIterationScope.h in Headers */, 4039 4048 A77A424317A0BBFD00A8DB81 /* DFGSafeToExecute.h in Headers */, … … 4041 4050 86ECA3FA132DF25A002B2AD7 /* DFGScoreBoard.h in Headers */, 4042 4051 0FD8A31417D4326C00CA2C40 /* CodeBlockSet.h in Headers */, 4043 0F766D4615B3701F008F363E /* DFGScratchRegisterAllocator.h in Headers */,4044 4052 0F1E3A67153A21E2000F9456 /* DFGSilentRegisterSavePlan.h in Headers */, 4045 4053 0FFB921D16D02F300055A5DB /* DFGSlowPathGenerator.h in Headers */, … … 4176 4184 0F5EF91F16878F7D003E5C25 /* JITThunks.h in Headers */, 4177 4185 0FC712E317CD8793008CC93C /* JITToDFGDeferredCompilationCallback.h in Headers */, 4186 0F24E54D17EE274900ABB217 /* JITOperations.h in Headers */, 4178 4187 A76F54A313B28AAB00EF2BCE /* JITWriteBarrier.h in Headers */, 4179 4188 BC18C4160E16F5CD00B34460 /* JSActivation.h in Headers */, … … 4470 4479 0FF42744158EBE91004CB9FF /* udis86_input.h in Headers */, 4471 4480 0FF42748158EBE91004CB9FF /* udis86_syn.h in Headers */, 4481 0F24E55117EE274900ABB217 /* Repatch.h in Headers */, 4482 0F24E54F17EE274900ABB217 /* RegisterSet.h in Headers */, 4472 4483 0FF42749158EBE91004CB9FF /* udis86_types.h in Headers */, 4473 4484 A7E5AB391799E4B200D2833D /* UDis86Disassembler.h in Headers */, … … 4939 4950 A7D89CF717A0B8CC00773AD8 /* DFGFlushFormat.cpp in Sources */, 4940 4951 A7D89CF917A0B8CC00773AD8 /* DFGFlushLivenessAnalysisPhase.cpp in Sources */, 4952 0F24E54C17EE274900ABB217 /* JITOperations.cpp in Sources */, 4941 4953 86EC9DC71328DF82002B2AD7 /* DFGGraph.cpp in Sources */, 4942 4954 A704D90517A0BAA8006BA554 /* DFGInPlaceAbstractState.cpp in Sources */, … … 4969 4981 0FBE0F7416C1DB090082C5E8 /* DFGPredictionInjectionPhase.cpp in Sources */, 4970 4982 0FFFC95D14EF90B300C72532 /* DFGPredictionPropagationPhase.cpp in Sources */, 4971 86BB09C0138E381B0056702F /* DFGRepatch.cpp in Sources */,4972 4983 86EC9DD21328DF82002B2AD7 /* DFGSpeculativeJIT.cpp in Sources */, 4973 4984 86880F1F14328BB900B08D42 /* DFGSpeculativeJIT32_64.cpp in Sources */, … … 5235 5246 BCDE3B430E6C832D001453A7 /* Structure.cpp in Sources */, 5236 5247 7E4EE70F0EBB7A5B005934AA /* StructureChain.cpp in Sources */, 5248 0F24E55017EE274900ABB217 /* Repatch.cpp in Sources */, 5237 5249 C2F0F2D116BAEEE900187C19 /* StructureRareData.cpp in Sources */, 5238 5250 0F766D3815AE4A1C008F363E /* StructureStubClearingWatchpoint.cpp in Sources */, -
trunk/Source/JavaScriptCore/Target.pri
r156300 r156490 184 184 dfg/DFGPredictionPropagationPhase.cpp \ 185 185 dfg/DFGPredictionInjectionPhase.cpp \ 186 dfg/DFGRepatch.cpp \187 186 dfg/DFGSSAConversionPhase.cpp \ 188 187 dfg/DFGSpeculativeJIT.cpp \ … … 223 222 jit/JITOpcodes.cpp \ 224 223 jit/JITOpcodes32_64.cpp \ 224 jit/JITOperations.cpp \ 225 225 jit/JITPropertyAccess.cpp \ 226 226 jit/JITPropertyAccess32_64.cpp \ … … 230 230 jit/JITToDFGDeferredCompilationCallback.cpp \ 231 231 jit/JumpReplacementWatchpoint.cpp \ 232 jit/Repatch.cpp \ 232 233 jit/ThunkGenerators.cpp \ 233 234 llint/LLIntCLoop.cpp \ -
trunk/Source/JavaScriptCore/bytecode/CallLinkInfo.cpp
r156237 r156490 41 41 if (isDFG) { 42 42 #if ENABLE(DFG_JIT) 43 repatchBuffer.relink(callReturnLocation, (callType == Construct ? vm.getCTIStub( DFG::linkConstructThunkGenerator) : vm.getCTIStub(DFG::linkCallThunkGenerator)).code());43 repatchBuffer.relink(callReturnLocation, (callType == Construct ? vm.getCTIStub(linkConstructThunkGenerator) : vm.getCTIStub(linkCallThunkGenerator)).code()); 44 44 #else 45 45 RELEASE_ASSERT_NOT_REACHED(); 46 46 #endif 47 47 } else 48 repatchBuffer.relink(callReturnLocation, callType == Construct ? vm.getCTIStub( linkConstructGenerator).code() : vm.getCTIStub(linkCallGenerator).code());48 repatchBuffer.relink(callReturnLocation, callType == Construct ? vm.getCTIStub(oldStyleLinkConstructGenerator).code() : vm.getCTIStub(oldStyleLinkCallGenerator).code()); 49 49 hasSeenShouldRepatch = false; 50 50 callee.clear(); -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r156482 r156490 37 37 #include "DFGDriver.h" 38 38 #include "DFGNode.h" 39 #include "DFGRepatch.h"40 39 #include "DFGWorklist.h" 41 40 #include "Debugger.h" … … 51 50 #include "PolymorphicPutByIdList.h" 52 51 #include "ReduceWhitespace.h" 52 #include "Repatch.h" 53 53 #include "RepatchBuffer.h" 54 54 #include "SlotVisitorInlines.h" … … 2387 2387 case JITCode::DFGJIT: 2388 2388 if (isGetByIdAccess(accessType)) 2389 DFG::resetGetByID(repatchBuffer, stubInfo);2389 resetGetByID(repatchBuffer, stubInfo); 2390 2390 else if (isPutByIdAccess(accessType)) 2391 DFG::resetPutByID(repatchBuffer, stubInfo);2391 resetPutByID(repatchBuffer, stubInfo); 2392 2392 else { 2393 2393 RELEASE_ASSERT(isInAccess(accessType)); 2394 DFG::resetIn(repatchBuffer, stubInfo);2394 resetIn(repatchBuffer, stubInfo); 2395 2395 } 2396 2396 break; -
trunk/Source/JavaScriptCore/bytecode/StructureStubInfo.h
r156237 r156490 32 32 33 33 #include "CodeOrigin.h" 34 #include "DFGRegisterSet.h"35 34 #include "Instruction.h" 36 35 #include "JITStubRoutine.h" … … 38 37 #include "Opcode.h" 39 38 #include "PolymorphicAccessStructureList.h" 39 #include "RegisterSet.h" 40 40 #include "Structure.h" 41 41 #include "StructureStubClearingWatchpoint.h" … … 232 232 #endif 233 233 int8_t valueGPR; 234 DFG::RegisterSetPOD usedRegisters;234 RegisterSetPOD usedRegisters; 235 235 int32_t deltaCallToDone; 236 236 int32_t deltaCallToStorageLoad; -
trunk/Source/JavaScriptCore/dfg/DFGCallArrayAllocatorSlowPathGenerator.h
r156237 r156490 41 41 public: 42 42 CallArrayAllocatorSlowPathGenerator( 43 MacroAssembler::JumpList from, SpeculativeJIT* jit, P_ DFGOperation_EStZ function,43 MacroAssembler::JumpList from, SpeculativeJIT* jit, P_JITOperation_EStZ function, 44 44 GPRReg resultGPR, GPRReg storageGPR, Structure* structure, size_t size) 45 45 : JumpingSlowPathGenerator<MacroAssembler::JumpList>(from, jit) … … 69 69 70 70 private: 71 P_ DFGOperation_EStZ m_function;71 P_JITOperation_EStZ m_function; 72 72 GPRReg m_resultGPR; 73 73 GPRReg m_storageGPR; … … 80 80 public: 81 81 CallArrayAllocatorWithVariableSizeSlowPathGenerator( 82 MacroAssembler::JumpList from, SpeculativeJIT* jit, P_ DFGOperation_EStZ function,82 MacroAssembler::JumpList from, SpeculativeJIT* jit, P_JITOperation_EStZ function, 83 83 GPRReg resultGPR, Structure* contiguousStructure, Structure* arrayStorageStructure, GPRReg sizeGPR) 84 84 : JumpingSlowPathGenerator<MacroAssembler::JumpList>(from, jit) … … 113 113 114 114 private: 115 P_ DFGOperation_EStZ m_function;115 P_JITOperation_EStZ m_function; 116 116 GPRReg m_resultGPR; 117 117 Structure* m_contiguousStructure; -
trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.h
r156300 r156490 37 37 #include "DFGOSRExitCompilationInfo.h" 38 38 #include "DFGRegisterBank.h" 39 #include "DFGRegisterSet.h"40 39 #include "FPRInfo.h" 41 40 #include "GPRInfo.h" … … 43 42 #include "LinkBuffer.h" 44 43 #include "MacroAssembler.h" 44 #include "RegisterSet.h" 45 45 46 46 namespace JSC { -
trunk/Source/JavaScriptCore/dfg/DFGOSRExitCompiler.h
r156237 r156490 77 77 78 78 extern "C" { 79 void DFG_OPERATION compileOSRExit(ExecState*) WTF_INTERNAL;79 void JIT_OPERATION compileOSRExit(ExecState*) WTF_INTERNAL; 80 80 } 81 81 -
trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp
r156300 r156490 34 34 #include "DFGDriver.h" 35 35 #include "DFGOSRExit.h" 36 #include "DFGRepatch.h"37 36 #include "DFGThunks.h" 38 37 #include "DFGToFTLDeferredCompilationCallback.h" … … 46 45 #include "JIT.h" 47 46 #include "JITExceptions.h" 47 #include "JITOperationWrappers.h" 48 48 #include "JSActivation.h" 49 49 #include "VM.h" … … 52 52 #include "ObjectConstructor.h" 53 53 #include "Operations.h" 54 #include "Repatch.h" 54 55 #include "StringConstructor.h" 55 56 #include "TypedArrayInlines.h" … … 57 58 58 59 #if ENABLE(JIT) 59 60 #if CPU(MIPS)61 #if WTF_MIPS_PIC62 #define LOAD_FUNCTION_TO_T9(function) \63 ".set noreorder" "\n" \64 ".cpload $25" "\n" \65 ".set reorder" "\n" \66 "la $t9, " LOCAL_REFERENCE(function) "\n"67 #else68 #define LOAD_FUNCTION_TO_T9(function) "" "\n"69 #endif70 #endif71 72 60 #if ENABLE(DFG_JIT) 73 74 #if COMPILER(GCC) && CPU(X86_64)75 76 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, register) \77 asm( \78 ".globl " SYMBOL_STRING(function) "\n" \79 HIDE_SYMBOL(function) "\n" \80 SYMBOL_STRING(function) ":" "\n" \81 "mov (%rsp), %" STRINGIZE(register) "\n" \82 "jmp " LOCAL_REFERENCE(function##WithReturnAddress) "\n" \83 );84 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, rsi)85 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, rcx)86 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, rcx)87 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, r8)88 89 #elif COMPILER(GCC) && CPU(X86)90 91 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, offset) \92 asm( \93 ".text" "\n" \94 ".globl " SYMBOL_STRING(function) "\n" \95 HIDE_SYMBOL(function) "\n" \96 SYMBOL_STRING(function) ":" "\n" \97 "mov (%esp), %eax\n" \98 "mov %eax, " STRINGIZE(offset) "(%esp)\n" \99 "jmp " LOCAL_REFERENCE(function##WithReturnAddress) "\n" \100 );101 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 8)102 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 16)103 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 20)104 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 24)105 106 #elif COMPILER(GCC) && CPU(ARM_THUMB2)107 108 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \109 asm ( \110 ".text" "\n" \111 ".align 2" "\n" \112 ".globl " SYMBOL_STRING(function) "\n" \113 HIDE_SYMBOL(function) "\n" \114 ".thumb" "\n" \115 ".thumb_func " THUMB_FUNC_PARAM(function) "\n" \116 SYMBOL_STRING(function) ":" "\n" \117 "mov a2, lr" "\n" \118 "b " LOCAL_REFERENCE(function) "WithReturnAddress" "\n" \119 );120 121 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) \122 asm ( \123 ".text" "\n" \124 ".align 2" "\n" \125 ".globl " SYMBOL_STRING(function) "\n" \126 HIDE_SYMBOL(function) "\n" \127 ".thumb" "\n" \128 ".thumb_func " THUMB_FUNC_PARAM(function) "\n" \129 SYMBOL_STRING(function) ":" "\n" \130 "mov a4, lr" "\n" \131 "b " LOCAL_REFERENCE(function) "WithReturnAddress" "\n" \132 );133 134 // EncodedJSValue in JSVALUE32_64 is a 64-bit integer. When being compiled in ARM EABI, it must be aligned even-numbered register (r0, r2 or [sp]).135 // As a result, return address will be at a 4-byte further location in the following cases.136 #if COMPILER_SUPPORTS(EABI) && CPU(ARM)137 #define INSTRUCTION_STORE_RETURN_ADDRESS_EJI "str lr, [sp, #4]"138 #define INSTRUCTION_STORE_RETURN_ADDRESS_EJCI "str lr, [sp, #8]"139 #else140 #define INSTRUCTION_STORE_RETURN_ADDRESS_EJI "str lr, [sp, #0]"141 #define INSTRUCTION_STORE_RETURN_ADDRESS_EJCI "str lr, [sp, #4]"142 #endif143 144 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \145 asm ( \146 ".text" "\n" \147 ".align 2" "\n" \148 ".globl " SYMBOL_STRING(function) "\n" \149 HIDE_SYMBOL(function) "\n" \150 ".thumb" "\n" \151 ".thumb_func " THUMB_FUNC_PARAM(function) "\n" \152 SYMBOL_STRING(function) ":" "\n" \153 INSTRUCTION_STORE_RETURN_ADDRESS_EJI "\n" \154 "b " LOCAL_REFERENCE(function) "WithReturnAddress" "\n" \155 );156 157 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \158 asm ( \159 ".text" "\n" \160 ".align 2" "\n" \161 ".globl " SYMBOL_STRING(function) "\n" \162 HIDE_SYMBOL(function) "\n" \163 ".thumb" "\n" \164 ".thumb_func " THUMB_FUNC_PARAM(function) "\n" \165 SYMBOL_STRING(function) ":" "\n" \166 INSTRUCTION_STORE_RETURN_ADDRESS_EJCI "\n" \167 "b " LOCAL_REFERENCE(function) "WithReturnAddress" "\n" \168 );169 170 #elif COMPILER(GCC) && CPU(ARM_TRADITIONAL)171 172 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \173 asm ( \174 ".text" "\n" \175 ".globl " SYMBOL_STRING(function) "\n" \176 HIDE_SYMBOL(function) "\n" \177 INLINE_ARM_FUNCTION(function) \178 SYMBOL_STRING(function) ":" "\n" \179 "mov a2, lr" "\n" \180 "b " LOCAL_REFERENCE(function) "WithReturnAddress" "\n" \181 );182 183 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) \184 asm ( \185 ".text" "\n" \186 ".globl " SYMBOL_STRING(function) "\n" \187 HIDE_SYMBOL(function) "\n" \188 INLINE_ARM_FUNCTION(function) \189 SYMBOL_STRING(function) ":" "\n" \190 "mov a4, lr" "\n" \191 "b " LOCAL_REFERENCE(function) "WithReturnAddress" "\n" \192 );193 194 // EncodedJSValue in JSVALUE32_64 is a 64-bit integer. When being compiled in ARM EABI, it must be aligned even-numbered register (r0, r2 or [sp]).195 // As a result, return address will be at a 4-byte further location in the following cases.196 #if COMPILER_SUPPORTS(EABI) && CPU(ARM)197 #define INSTRUCTION_STORE_RETURN_ADDRESS_EJI "str lr, [sp, #4]"198 #define INSTRUCTION_STORE_RETURN_ADDRESS_EJCI "str lr, [sp, #8]"199 #else200 #define INSTRUCTION_STORE_RETURN_ADDRESS_EJI "str lr, [sp, #0]"201 #define INSTRUCTION_STORE_RETURN_ADDRESS_EJCI "str lr, [sp, #4]"202 #endif203 204 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \205 asm ( \206 ".text" "\n" \207 ".globl " SYMBOL_STRING(function) "\n" \208 HIDE_SYMBOL(function) "\n" \209 INLINE_ARM_FUNCTION(function) \210 SYMBOL_STRING(function) ":" "\n" \211 INSTRUCTION_STORE_RETURN_ADDRESS_EJI "\n" \212 "b " LOCAL_REFERENCE(function) "WithReturnAddress" "\n" \213 );214 215 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \216 asm ( \217 ".text" "\n" \218 ".globl " SYMBOL_STRING(function) "\n" \219 HIDE_SYMBOL(function) "\n" \220 INLINE_ARM_FUNCTION(function) \221 SYMBOL_STRING(function) ":" "\n" \222 INSTRUCTION_STORE_RETURN_ADDRESS_EJCI "\n" \223 "b " LOCAL_REFERENCE(function) "WithReturnAddress" "\n" \224 );225 226 #elif COMPILER(GCC) && CPU(MIPS)227 228 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \229 asm( \230 ".text" "\n" \231 ".globl " SYMBOL_STRING(function) "\n" \232 HIDE_SYMBOL(function) "\n" \233 SYMBOL_STRING(function) ":" "\n" \234 LOAD_FUNCTION_TO_T9(function##WithReturnAddress) \235 "move $a1, $ra" "\n" \236 "b " LOCAL_REFERENCE(function) "WithReturnAddress" "\n" \237 );238 239 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) \240 asm( \241 ".text" "\n" \242 ".globl " SYMBOL_STRING(function) "\n" \243 HIDE_SYMBOL(function) "\n" \244 SYMBOL_STRING(function) ":" "\n" \245 LOAD_FUNCTION_TO_T9(function##WithReturnAddress) \246 "move $a3, $ra" "\n" \247 "b " LOCAL_REFERENCE(function) "WithReturnAddress" "\n" \248 );249 250 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \251 asm( \252 ".text" "\n" \253 ".globl " SYMBOL_STRING(function) "\n" \254 HIDE_SYMBOL(function) "\n" \255 SYMBOL_STRING(function) ":" "\n" \256 LOAD_FUNCTION_TO_T9(function##WithReturnAddress) \257 "sw $ra, 20($sp)" "\n" \258 "b " LOCAL_REFERENCE(function) "WithReturnAddress" "\n" \259 );260 261 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \262 asm( \263 ".text" "\n" \264 ".globl " SYMBOL_STRING(function) "\n" \265 HIDE_SYMBOL(function) "\n" \266 SYMBOL_STRING(function) ":" "\n" \267 LOAD_FUNCTION_TO_T9(function##WithReturnAddress) \268 "sw $ra, 24($sp)" "\n" \269 "b " LOCAL_REFERENCE(function) "WithReturnAddress" "\n" \270 );271 272 #elif COMPILER(GCC) && CPU(SH4)273 274 #define SH4_SCRATCH_REGISTER "r11"275 276 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \277 asm( \278 ".text" "\n" \279 ".globl " SYMBOL_STRING(function) "\n" \280 HIDE_SYMBOL(function) "\n" \281 SYMBOL_STRING(function) ":" "\n" \282 "sts pr, r5" "\n" \283 "bra " LOCAL_REFERENCE(function) "WithReturnAddress" "\n" \284 "nop" "\n" \285 );286 287 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) \288 asm( \289 ".text" "\n" \290 ".globl " SYMBOL_STRING(function) "\n" \291 HIDE_SYMBOL(function) "\n" \292 SYMBOL_STRING(function) ":" "\n" \293 "sts pr, r7" "\n" \294 "mov.l 2f, " SH4_SCRATCH_REGISTER "\n" \295 "braf " SH4_SCRATCH_REGISTER "\n" \296 "nop" "\n" \297 "1: .balign 4" "\n" \298 "2: .long " LOCAL_REFERENCE(function) "WithReturnAddress-1b" "\n" \299 );300 301 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, offset, scratch) \302 asm( \303 ".text" "\n" \304 ".globl " SYMBOL_STRING(function) "\n" \305 HIDE_SYMBOL(function) "\n" \306 SYMBOL_STRING(function) ":" "\n" \307 "sts pr, " scratch "\n" \308 "mov.l " scratch ", @(" STRINGIZE(offset) ", r15)" "\n" \309 "mov.l 2f, " scratch "\n" \310 "braf " scratch "\n" \311 "nop" "\n" \312 "1: .balign 4" "\n" \313 "2: .long " LOCAL_REFERENCE(function) "WithReturnAddress-1b" "\n" \314 );315 316 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 0, SH4_SCRATCH_REGISTER)317 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 4, SH4_SCRATCH_REGISTER)318 319 #endif320 321 #define P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \322 void* DFG_OPERATION function##WithReturnAddress(ExecState*, ReturnAddressPtr) REFERENCED_FROM_ASM WTF_INTERNAL; \323 FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function)324 325 #define J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) \326 EncodedJSValue DFG_OPERATION function##WithReturnAddress(ExecState*, JSCell*, StringImpl*, ReturnAddressPtr) REFERENCED_FROM_ASM WTF_INTERNAL; \327 FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function)328 329 #define J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \330 EncodedJSValue DFG_OPERATION function##WithReturnAddress(ExecState*, EncodedJSValue, StringImpl*, ReturnAddressPtr) REFERENCED_FROM_ASM WTF_INTERNAL; \331 FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function)332 333 #define V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \334 void DFG_OPERATION function##WithReturnAddress(ExecState*, EncodedJSValue, JSCell*, StringImpl*, ReturnAddressPtr) REFERENCED_FROM_ASM WTF_INTERNAL; \335 FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function)336 61 337 62 namespace JSC { namespace DFG { … … 358 83 359 84 template<bool strict> 360 ALWAYS_INLINE static void DFG_OPERATION operationPutByValInternal(ExecState* exec, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue)85 ALWAYS_INLINE static void JIT_OPERATION operationPutByValInternal(ExecState* exec, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue) 361 86 { 362 87 VM* vm = &exec->vm(); … … 467 192 extern "C" { 468 193 469 EncodedJSValue DFG_OPERATION operationToThis(ExecState* exec, EncodedJSValue encodedOp)194 EncodedJSValue JIT_OPERATION operationToThis(ExecState* exec, EncodedJSValue encodedOp) 470 195 { 471 196 VM* vm = &exec->vm(); … … 475 200 } 476 201 477 EncodedJSValue DFG_OPERATION operationToThisStrict(ExecState* exec, EncodedJSValue encodedOp)202 EncodedJSValue JIT_OPERATION operationToThisStrict(ExecState* exec, EncodedJSValue encodedOp) 478 203 { 479 204 VM* vm = &exec->vm(); … … 483 208 } 484 209 485 JSCell* DFG_OPERATION operationCreateThis(ExecState* exec, JSObject* constructor, int32_t inlineCapacity)210 JSCell* JIT_OPERATION operationCreateThis(ExecState* exec, JSObject* constructor, int32_t inlineCapacity) 486 211 { 487 212 VM* vm = &exec->vm(); … … 496 221 } 497 222 498 JSCell* DFG_OPERATION operationNewObject(ExecState* exec, Structure* structure)223 JSCell* JIT_OPERATION operationNewObject(ExecState* exec, Structure* structure) 499 224 { 500 225 VM* vm = &exec->vm(); … … 504 229 } 505 230 506 EncodedJSValue DFG_OPERATION operationValueAdd(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)231 EncodedJSValue JIT_OPERATION operationValueAdd(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) 507 232 { 508 233 VM* vm = &exec->vm(); … … 515 240 } 516 241 517 EncodedJSValue DFG_OPERATION operationValueAddNotNumber(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)242 EncodedJSValue JIT_OPERATION operationValueAddNotNumber(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) 518 243 { 519 244 VM* vm = &exec->vm(); … … 548 273 } 549 274 550 EncodedJSValue DFG_OPERATION operationGetByVal(ExecState* exec, EncodedJSValue encodedBase, EncodedJSValue encodedProperty)275 EncodedJSValue JIT_OPERATION operationGetByVal(ExecState* exec, EncodedJSValue encodedBase, EncodedJSValue encodedProperty) 551 276 { 552 277 VM* vm = &exec->vm(); … … 579 304 } 580 305 581 EncodedJSValue DFG_OPERATION operationGetByValCell(ExecState* exec, JSCell* base, EncodedJSValue encodedProperty)306 EncodedJSValue JIT_OPERATION operationGetByValCell(ExecState* exec, JSCell* base, EncodedJSValue encodedProperty) 582 307 { 583 308 VM* vm = &exec->vm(); … … 619 344 } 620 345 621 EncodedJSValue DFG_OPERATION operationGetByValArrayInt(ExecState* exec, JSArray* base, int32_t index)346 EncodedJSValue JIT_OPERATION operationGetByValArrayInt(ExecState* exec, JSArray* base, int32_t index) 622 347 { 623 348 return getByValCellInt(exec, base, index); 624 349 } 625 350 626 EncodedJSValue DFG_OPERATION operationGetByValStringInt(ExecState* exec, JSString* base, int32_t index)351 EncodedJSValue JIT_OPERATION operationGetByValStringInt(ExecState* exec, JSString* base, int32_t index) 627 352 { 628 353 return getByValCellInt(exec, base, index); 629 354 } 630 355 631 EncodedJSValue DFG_OPERATION operationGetById(ExecState* exec, EncodedJSValue base, StringImpl* uid) 632 { 633 VM* vm = &exec->vm(); 634 NativeCallFrameTracer tracer(vm, exec); 635 636 JSValue baseValue = JSValue::decode(base); 637 PropertySlot slot(baseValue); 638 Identifier ident(vm, uid); 639 return JSValue::encode(baseValue.get(exec, ident, slot)); 640 } 641 642 J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(operationGetByIdBuildList); 643 EncodedJSValue DFG_OPERATION operationGetByIdBuildListWithReturnAddress(ExecState* exec, EncodedJSValue base, StringImpl* uid, ReturnAddressPtr returnAddress) 644 { 645 VM* vm = &exec->vm(); 646 NativeCallFrameTracer tracer(vm, exec); 647 648 Identifier ident(vm, uid); 649 StructureStubInfo& stubInfo = exec->codeBlock()->getStubInfo(returnAddress); 650 AccessType accessType = static_cast<AccessType>(stubInfo.accessType); 651 652 JSValue baseValue = JSValue::decode(base); 653 PropertySlot slot(baseValue); 654 JSValue result = baseValue.get(exec, ident, slot); 655 656 if (accessType == static_cast<AccessType>(stubInfo.accessType)) 657 buildGetByIDList(exec, baseValue, ident, slot, stubInfo); 658 659 return JSValue::encode(result); 660 } 661 662 J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(operationGetByIdOptimize); 663 EncodedJSValue DFG_OPERATION operationGetByIdOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue base, StringImpl* uid, ReturnAddressPtr returnAddress) 664 { 665 VM* vm = &exec->vm(); 666 NativeCallFrameTracer tracer(vm, exec); 667 668 Identifier ident(vm, uid); 669 StructureStubInfo& stubInfo = exec->codeBlock()->getStubInfo(returnAddress); 670 AccessType accessType = static_cast<AccessType>(stubInfo.accessType); 671 672 JSValue baseValue = JSValue::decode(base); 673 PropertySlot slot(baseValue); 674 JSValue result = baseValue.get(exec, ident, slot); 675 676 if (accessType == static_cast<AccessType>(stubInfo.accessType)) { 677 if (stubInfo.seen) 678 repatchGetByID(exec, baseValue, ident, slot, stubInfo); 679 else 680 stubInfo.seen = true; 681 } 682 683 return JSValue::encode(result); 684 } 685 686 J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(operationInOptimize); 687 EncodedJSValue DFG_OPERATION operationInOptimizeWithReturnAddress(ExecState* exec, JSCell* base, StringImpl* key, ReturnAddressPtr returnAddress) 688 { 689 VM* vm = &exec->vm(); 690 NativeCallFrameTracer tracer(vm, exec); 691 692 if (!base->isObject()) { 693 vm->throwException(exec, createInvalidParameterError(exec, "in", base)); 694 return JSValue::encode(jsUndefined()); 695 } 696 697 StructureStubInfo& stubInfo = exec->codeBlock()->getStubInfo(returnAddress); 698 AccessType accessType = static_cast<AccessType>(stubInfo.accessType); 699 700 Identifier ident(vm, key); 701 PropertySlot slot(base); 702 bool result = asObject(base)->getPropertySlot(exec, ident, slot); 703 704 RELEASE_ASSERT(accessType == stubInfo.accessType); 705 706 if (stubInfo.seen) 707 repatchIn(exec, base, ident, result, slot, stubInfo); 708 else 709 stubInfo.seen = true; 710 711 return JSValue::encode(jsBoolean(result)); 712 } 713 714 EncodedJSValue DFG_OPERATION operationIn(ExecState* exec, JSCell* base, StringImpl* key) 715 { 716 VM* vm = &exec->vm(); 717 NativeCallFrameTracer tracer(vm, exec); 718 719 if (!base->isObject()) { 720 vm->throwException(exec, createInvalidParameterError(exec, "in", base)); 721 return JSValue::encode(jsUndefined()); 722 } 723 724 Identifier ident(vm, key); 725 return JSValue::encode(jsBoolean(asObject(base)->hasProperty(exec, ident))); 726 } 727 728 EncodedJSValue DFG_OPERATION operationGenericIn(ExecState* exec, JSCell* base, EncodedJSValue key) 729 { 730 VM* vm = &exec->vm(); 731 NativeCallFrameTracer tracer(vm, exec); 732 733 return JSValue::encode(jsBoolean(CommonSlowPaths::opIn(exec, JSValue::decode(key), base))); 734 } 735 736 EncodedJSValue DFG_OPERATION operationCallCustomGetter(ExecState* exec, JSCell* base, PropertySlot::GetValueFunc function, StringImpl* uid) 737 { 738 VM* vm = &exec->vm(); 739 NativeCallFrameTracer tracer(vm, exec); 740 741 Identifier ident(vm, uid); 742 743 return JSValue::encode(function(exec, asObject(base), ident)); 744 } 745 746 EncodedJSValue DFG_OPERATION operationCallGetter(ExecState* exec, JSCell* base, JSCell* getterSetter) 747 { 748 VM* vm = &exec->vm(); 749 NativeCallFrameTracer tracer(vm, exec); 750 751 return JSValue::encode(callGetter(exec, base, getterSetter)); 752 } 753 754 void DFG_OPERATION operationPutByValStrict(ExecState* exec, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue) 356 void JIT_OPERATION operationPutByValStrict(ExecState* exec, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue) 755 357 { 756 358 VM* vm = &exec->vm(); … … 760 362 } 761 363 762 void DFG_OPERATION operationPutByValNonStrict(ExecState* exec, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue)364 void JIT_OPERATION operationPutByValNonStrict(ExecState* exec, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue) 763 365 { 764 366 VM* vm = &exec->vm(); … … 768 370 } 769 371 770 void DFG_OPERATION operationPutByValCellStrict(ExecState* exec, JSCell* cell, EncodedJSValue encodedProperty, EncodedJSValue encodedValue)372 void JIT_OPERATION operationPutByValCellStrict(ExecState* exec, JSCell* cell, EncodedJSValue encodedProperty, EncodedJSValue encodedValue) 771 373 { 772 374 VM* vm = &exec->vm(); … … 776 378 } 777 379 778 void DFG_OPERATION operationPutByValCellNonStrict(ExecState* exec, JSCell* cell, EncodedJSValue encodedProperty, EncodedJSValue encodedValue)380 void JIT_OPERATION operationPutByValCellNonStrict(ExecState* exec, JSCell* cell, EncodedJSValue encodedProperty, EncodedJSValue encodedValue) 779 381 { 780 382 VM* vm = &exec->vm(); … … 784 386 } 785 387 786 void DFG_OPERATION operationPutByValBeyondArrayBoundsStrict(ExecState* exec, JSObject* array, int32_t index, EncodedJSValue encodedValue)388 void JIT_OPERATION operationPutByValBeyondArrayBoundsStrict(ExecState* exec, JSObject* array, int32_t index, EncodedJSValue encodedValue) 787 389 { 788 390 VM* vm = &exec->vm(); … … 799 401 } 800 402 801 void DFG_OPERATION operationPutByValBeyondArrayBoundsNonStrict(ExecState* exec, JSObject* array, int32_t index, EncodedJSValue encodedValue)403 void JIT_OPERATION operationPutByValBeyondArrayBoundsNonStrict(ExecState* exec, JSObject* array, int32_t index, EncodedJSValue encodedValue) 802 404 { 803 405 VM* vm = &exec->vm(); … … 814 416 } 815 417 816 void DFG_OPERATION operationPutDoubleByValBeyondArrayBoundsStrict(ExecState* exec, JSObject* array, int32_t index, double value)418 void JIT_OPERATION operationPutDoubleByValBeyondArrayBoundsStrict(ExecState* exec, JSObject* array, int32_t index, double value) 817 419 { 818 420 VM* vm = &exec->vm(); … … 831 433 } 832 434 833 void DFG_OPERATION operationPutDoubleByValBeyondArrayBoundsNonStrict(ExecState* exec, JSObject* array, int32_t index, double value)435 void JIT_OPERATION operationPutDoubleByValBeyondArrayBoundsNonStrict(ExecState* exec, JSObject* array, int32_t index, double value) 834 436 { 835 437 VM* vm = &exec->vm(); … … 848 450 } 849 451 850 EncodedJSValue DFG_OPERATION operationArrayPush(ExecState* exec, EncodedJSValue encodedValue, JSArray* array)452 EncodedJSValue JIT_OPERATION operationArrayPush(ExecState* exec, EncodedJSValue encodedValue, JSArray* array) 851 453 { 852 454 VM* vm = &exec->vm(); … … 857 459 } 858 460 859 EncodedJSValue DFG_OPERATION operationArrayPushDouble(ExecState* exec, double value, JSArray* array)461 EncodedJSValue JIT_OPERATION operationArrayPushDouble(ExecState* exec, double value, JSArray* array) 860 462 { 861 463 VM* vm = &exec->vm(); … … 866 468 } 867 469 868 EncodedJSValue DFG_OPERATION operationArrayPop(ExecState* exec, JSArray* array)470 EncodedJSValue JIT_OPERATION operationArrayPop(ExecState* exec, JSArray* array) 869 471 { 870 472 VM* vm = &exec->vm(); … … 874 476 } 875 477 876 EncodedJSValue DFG_OPERATION operationArrayPopAndRecoverLength(ExecState* exec, JSArray* array)478 EncodedJSValue JIT_OPERATION operationArrayPopAndRecoverLength(ExecState* exec, JSArray* array) 877 479 { 878 480 VM* vm = &exec->vm(); … … 884 486 } 885 487 886 EncodedJSValue DFG_OPERATION operationRegExpExec(ExecState* exec, JSCell* base, JSCell* argument)488 EncodedJSValue JIT_OPERATION operationRegExpExec(ExecState* exec, JSCell* base, JSCell* argument) 887 489 { 888 490 VM& vm = exec->vm(); … … 897 499 } 898 500 899 size_t DFG_OPERATION operationRegExpTest(ExecState* exec, JSCell* base, JSCell* argument)501 size_t JIT_OPERATION operationRegExpTest(ExecState* exec, JSCell* base, JSCell* argument) 900 502 { 901 503 VM& vm = exec->vm(); … … 912 514 } 913 515 914 void DFG_OPERATION operationPutByIdStrict(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid) 915 { 916 VM* vm = &exec->vm(); 917 NativeCallFrameTracer tracer(vm, exec); 918 919 Identifier ident(vm, uid); 920 PutPropertySlot slot(true, exec->codeBlock()->putByIdContext()); 921 base->methodTable()->put(base, exec, ident, JSValue::decode(encodedValue), slot); 922 } 923 924 void DFG_OPERATION operationPutByIdNonStrict(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid) 925 { 926 VM* vm = &exec->vm(); 927 NativeCallFrameTracer tracer(vm, exec); 928 929 Identifier ident(vm, uid); 930 PutPropertySlot slot(false, exec->codeBlock()->putByIdContext()); 931 base->methodTable()->put(base, exec, ident, JSValue::decode(encodedValue), slot); 932 } 933 934 void DFG_OPERATION operationPutByIdDirectStrict(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid) 935 { 936 VM* vm = &exec->vm(); 937 NativeCallFrameTracer tracer(vm, exec); 938 939 Identifier ident(vm, uid); 940 PutPropertySlot slot(true, exec->codeBlock()->putByIdContext()); 941 ASSERT(base->isObject()); 942 asObject(base)->putDirect(exec->vm(), ident, JSValue::decode(encodedValue), slot); 943 } 944 945 void DFG_OPERATION operationPutByIdDirectNonStrict(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid) 946 { 947 VM* vm = &exec->vm(); 948 NativeCallFrameTracer tracer(vm, exec); 949 950 Identifier ident(vm, uid); 951 PutPropertySlot slot(false, exec->codeBlock()->putByIdContext()); 952 ASSERT(base->isObject()); 953 asObject(base)->putDirect(exec->vm(), ident, JSValue::decode(encodedValue), slot); 954 } 955 956 V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdStrictOptimize); 957 void DFG_OPERATION operationPutByIdStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid, ReturnAddressPtr returnAddress) 958 { 959 VM* vm = &exec->vm(); 960 NativeCallFrameTracer tracer(vm, exec); 961 962 Identifier ident(vm, uid); 963 StructureStubInfo& stubInfo = exec->codeBlock()->getStubInfo(returnAddress); 964 AccessType accessType = static_cast<AccessType>(stubInfo.accessType); 965 966 JSValue value = JSValue::decode(encodedValue); 967 JSValue baseValue(base); 968 PutPropertySlot slot(true, exec->codeBlock()->putByIdContext()); 969 970 baseValue.put(exec, ident, value, slot); 971 972 if (accessType != static_cast<AccessType>(stubInfo.accessType)) 973 return; 974 975 if (stubInfo.seen) 976 repatchPutByID(exec, baseValue, ident, slot, stubInfo, NotDirect); 977 else 978 stubInfo.seen = true; 979 } 980 981 V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdNonStrictOptimize); 982 void DFG_OPERATION operationPutByIdNonStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid, ReturnAddressPtr returnAddress) 983 { 984 VM* vm = &exec->vm(); 985 NativeCallFrameTracer tracer(vm, exec); 986 987 Identifier ident(vm, uid); 988 StructureStubInfo& stubInfo = exec->codeBlock()->getStubInfo(returnAddress); 989 AccessType accessType = static_cast<AccessType>(stubInfo.accessType); 990 991 JSValue value = JSValue::decode(encodedValue); 992 JSValue baseValue(base); 993 PutPropertySlot slot(false, exec->codeBlock()->putByIdContext()); 994 995 baseValue.put(exec, ident, value, slot); 996 997 if (accessType != static_cast<AccessType>(stubInfo.accessType)) 998 return; 999 1000 if (stubInfo.seen) 1001 repatchPutByID(exec, baseValue, ident, slot, stubInfo, NotDirect); 1002 else 1003 stubInfo.seen = true; 1004 } 1005 1006 V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdDirectStrictOptimize); 1007 void DFG_OPERATION operationPutByIdDirectStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid, ReturnAddressPtr returnAddress) 1008 { 1009 VM* vm = &exec->vm(); 1010 NativeCallFrameTracer tracer(vm, exec); 1011 1012 Identifier ident(vm, uid); 1013 StructureStubInfo& stubInfo = exec->codeBlock()->getStubInfo(returnAddress); 1014 AccessType accessType = static_cast<AccessType>(stubInfo.accessType); 1015 1016 JSValue value = JSValue::decode(encodedValue); 1017 PutPropertySlot slot(true, exec->codeBlock()->putByIdContext()); 1018 1019 ASSERT(base->isObject()); 1020 asObject(base)->putDirect(exec->vm(), ident, value, slot); 1021 1022 if (accessType != static_cast<AccessType>(stubInfo.accessType)) 1023 return; 1024 1025 if (stubInfo.seen) 1026 repatchPutByID(exec, base, ident, slot, stubInfo, Direct); 1027 else 1028 stubInfo.seen = true; 1029 } 1030 1031 V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdDirectNonStrictOptimize); 1032 void DFG_OPERATION operationPutByIdDirectNonStrictOptimizeWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid, ReturnAddressPtr returnAddress) 1033 { 1034 VM* vm = &exec->vm(); 1035 NativeCallFrameTracer tracer(vm, exec); 1036 1037 Identifier ident(vm, uid); 1038 StructureStubInfo& stubInfo = exec->codeBlock()->getStubInfo(returnAddress); 1039 AccessType accessType = static_cast<AccessType>(stubInfo.accessType); 1040 1041 JSValue value = JSValue::decode(encodedValue); 1042 PutPropertySlot slot(false, exec->codeBlock()->putByIdContext()); 1043 1044 ASSERT(base->isObject()); 1045 asObject(base)->putDirect(exec->vm(), ident, value, slot); 1046 1047 if (accessType != static_cast<AccessType>(stubInfo.accessType)) 1048 return; 1049 1050 if (stubInfo.seen) 1051 repatchPutByID(exec, base, ident, slot, stubInfo, Direct); 1052 else 1053 stubInfo.seen = true; 1054 } 1055 1056 V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdStrictBuildList); 1057 void DFG_OPERATION operationPutByIdStrictBuildListWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid, ReturnAddressPtr returnAddress) 1058 { 1059 VM* vm = &exec->vm(); 1060 NativeCallFrameTracer tracer(vm, exec); 1061 1062 Identifier ident(vm, uid); 1063 StructureStubInfo& stubInfo = exec->codeBlock()->getStubInfo(returnAddress); 1064 AccessType accessType = static_cast<AccessType>(stubInfo.accessType); 1065 1066 JSValue value = JSValue::decode(encodedValue); 1067 JSValue baseValue(base); 1068 PutPropertySlot slot(true, exec->codeBlock()->putByIdContext()); 1069 1070 baseValue.put(exec, ident, value, slot); 1071 1072 if (accessType != static_cast<AccessType>(stubInfo.accessType)) 1073 return; 1074 1075 buildPutByIdList(exec, baseValue, ident, slot, stubInfo, NotDirect); 1076 } 1077 1078 V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdNonStrictBuildList); 1079 void DFG_OPERATION operationPutByIdNonStrictBuildListWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid, ReturnAddressPtr returnAddress) 1080 { 1081 VM* vm = &exec->vm(); 1082 NativeCallFrameTracer tracer(vm, exec); 1083 1084 Identifier ident(vm, uid); 1085 StructureStubInfo& stubInfo = exec->codeBlock()->getStubInfo(returnAddress); 1086 AccessType accessType = static_cast<AccessType>(stubInfo.accessType); 1087 1088 JSValue value = JSValue::decode(encodedValue); 1089 JSValue baseValue(base); 1090 PutPropertySlot slot(false, exec->codeBlock()->putByIdContext()); 1091 1092 baseValue.put(exec, ident, value, slot); 1093 1094 if (accessType != static_cast<AccessType>(stubInfo.accessType)) 1095 return; 1096 1097 buildPutByIdList(exec, baseValue, ident, slot, stubInfo, NotDirect); 1098 } 1099 1100 V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdDirectStrictBuildList); 1101 void DFG_OPERATION operationPutByIdDirectStrictBuildListWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid, ReturnAddressPtr returnAddress) 1102 { 1103 VM* vm = &exec->vm(); 1104 NativeCallFrameTracer tracer(vm, exec); 1105 1106 Identifier ident(vm, uid); 1107 StructureStubInfo& stubInfo = exec->codeBlock()->getStubInfo(returnAddress); 1108 AccessType accessType = static_cast<AccessType>(stubInfo.accessType); 1109 1110 JSValue value = JSValue::decode(encodedValue); 1111 PutPropertySlot slot(true, exec->codeBlock()->putByIdContext()); 1112 1113 ASSERT(base->isObject()); 1114 asObject(base)->putDirect(exec->vm(), ident, value, slot); 1115 1116 if (accessType != static_cast<AccessType>(stubInfo.accessType)) 1117 return; 1118 1119 buildPutByIdList(exec, base, ident, slot, stubInfo, Direct); 1120 } 1121 1122 V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(operationPutByIdDirectNonStrictBuildList); 1123 void DFG_OPERATION operationPutByIdDirectNonStrictBuildListWithReturnAddress(ExecState* exec, EncodedJSValue encodedValue, JSCell* base, StringImpl* uid, ReturnAddressPtr returnAddress) 1124 { 1125 VM* vm = &exec->vm(); 1126 NativeCallFrameTracer tracer(vm, exec); 1127 1128 Identifier ident(vm, uid); 1129 StructureStubInfo& stubInfo = exec->codeBlock()->getStubInfo(returnAddress); 1130 AccessType accessType = static_cast<AccessType>(stubInfo.accessType); 1131 1132 JSValue value = JSValue::decode(encodedValue); 1133 PutPropertySlot slot(false, exec->codeBlock()->putByIdContext()); 1134 1135 ASSERT(base->isObject()); 1136 asObject(base)->putDirect(exec->vm(), ident, value, slot); 1137 1138 if (accessType != static_cast<AccessType>(stubInfo.accessType)) 1139 return; 1140 1141 buildPutByIdList(exec, base, ident, slot, stubInfo, Direct); 1142 } 1143 1144 size_t DFG_OPERATION operationCompareLess(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) 516 size_t JIT_OPERATION operationCompareLess(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) 1145 517 { 1146 518 VM* vm = &exec->vm(); … … 1150 522 } 1151 523 1152 size_t DFG_OPERATION operationCompareLessEq(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)524 size_t JIT_OPERATION operationCompareLessEq(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) 1153 525 { 1154 526 VM* vm = &exec->vm(); … … 1158 530 } 1159 531 1160 size_t DFG_OPERATION operationCompareGreater(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)532 size_t JIT_OPERATION operationCompareGreater(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) 1161 533 { 1162 534 VM* vm = &exec->vm(); … … 1166 538 } 1167 539 1168 size_t DFG_OPERATION operationCompareGreaterEq(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)540 size_t JIT_OPERATION operationCompareGreaterEq(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) 1169 541 { 1170 542 VM* vm = &exec->vm(); … … 1174 546 } 1175 547 1176 size_t DFG_OPERATION operationCompareEq(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)548 size_t JIT_OPERATION operationCompareEq(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) 1177 549 { 1178 550 VM* vm = &exec->vm(); … … 1183 555 1184 556 #if USE(JSVALUE64) 1185 EncodedJSValue DFG_OPERATION operationCompareStringEq(ExecState* exec, JSCell* left, JSCell* right)557 EncodedJSValue JIT_OPERATION operationCompareStringEq(ExecState* exec, JSCell* left, JSCell* right) 1186 558 #else 1187 size_t DFG_OPERATION operationCompareStringEq(ExecState* exec, JSCell* left, JSCell* right)559 size_t JIT_OPERATION operationCompareStringEq(ExecState* exec, JSCell* left, JSCell* right) 1188 560 #endif 1189 561 { … … 1199 571 } 1200 572 1201 size_t DFG_OPERATION operationCompareStrictEqCell(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)573 size_t JIT_OPERATION operationCompareStrictEqCell(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) 1202 574 { 1203 575 VM* vm = &exec->vm(); … … 1213 585 } 1214 586 1215 size_t DFG_OPERATION operationCompareStrictEq(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)587 size_t JIT_OPERATION operationCompareStrictEq(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) 1216 588 { 1217 589 VM* vm = &exec->vm(); … … 1224 596 } 1225 597 1226 static void* handleHostCall(ExecState* execCallee, JSValue callee, CodeSpecializationKind kind) 1227 { 1228 ExecState* exec = execCallee->callerFrame(); 1229 VM* vm = &exec->vm(); 1230 1231 execCallee->setScope(exec->scope()); 1232 execCallee->setCodeBlock(0); 1233 1234 if (kind == CodeForCall) { 1235 CallData callData; 1236 CallType callType = getCallData(callee, callData); 1237 1238 ASSERT(callType != CallTypeJS); 1239 1240 if (callType == CallTypeHost) { 1241 NativeCallFrameTracer tracer(vm, execCallee); 1242 execCallee->setCallee(asObject(callee)); 1243 vm->hostCallReturnValue = JSValue::decode(callData.native.function(execCallee)); 1244 if (vm->exception()) 1245 return vm->getCTIStub(throwExceptionFromCallSlowPathGenerator).code().executableAddress(); 1246 1247 return reinterpret_cast<void*>(getHostCallReturnValue); 1248 } 1249 1250 ASSERT(callType == CallTypeNone); 1251 exec->vm().throwException(exec, createNotAFunctionError(exec, callee)); 1252 return vm->getCTIStub(throwExceptionFromCallSlowPathGenerator).code().executableAddress(); 1253 } 1254 1255 ASSERT(kind == CodeForConstruct); 1256 1257 ConstructData constructData; 1258 ConstructType constructType = getConstructData(callee, constructData); 1259 1260 ASSERT(constructType != ConstructTypeJS); 1261 1262 if (constructType == ConstructTypeHost) { 1263 NativeCallFrameTracer tracer(vm, execCallee); 1264 execCallee->setCallee(asObject(callee)); 1265 vm->hostCallReturnValue = JSValue::decode(constructData.native.function(execCallee)); 1266 if (vm->exception()) 1267 return vm->getCTIStub(throwExceptionFromCallSlowPathGenerator).code().executableAddress(); 1268 1269 return reinterpret_cast<void*>(getHostCallReturnValue); 1270 } 1271 1272 ASSERT(constructType == ConstructTypeNone); 1273 exec->vm().throwException(exec, createNotAConstructorError(exec, callee)); 1274 return vm->getCTIStub(throwExceptionFromCallSlowPathGenerator).code().executableAddress(); 1275 } 1276 1277 inline char* linkFor(ExecState* execCallee, CodeSpecializationKind kind) 1278 { 1279 ExecState* exec = execCallee->callerFrame(); 1280 VM* vm = &exec->vm(); 1281 NativeCallFrameTracer tracer(vm, exec); 1282 1283 JSValue calleeAsValue = execCallee->calleeAsValue(); 1284 JSCell* calleeAsFunctionCell = getJSFunction(calleeAsValue); 1285 if (!calleeAsFunctionCell) 1286 return reinterpret_cast<char*>(handleHostCall(execCallee, calleeAsValue, kind)); 1287 1288 JSFunction* callee = jsCast<JSFunction*>(calleeAsFunctionCell); 1289 execCallee->setScope(callee->scopeUnchecked()); 1290 ExecutableBase* executable = callee->executable(); 1291 1292 MacroAssemblerCodePtr codePtr; 1293 CodeBlock* codeBlock = 0; 1294 if (executable->isHostFunction()) 1295 codePtr = executable->generatedJITCodeFor(kind)->addressForCall(); 1296 else { 1297 FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable); 1298 JSObject* error = functionExecutable->prepareForExecution(execCallee, callee->scope(), kind); 1299 if (error) { 1300 vm->throwException(exec, createStackOverflowError(exec)); 1301 return reinterpret_cast<char*>(vm->getCTIStub(throwExceptionFromCallSlowPathGenerator).code().executableAddress()); 1302 } 1303 codeBlock = functionExecutable->codeBlockFor(kind); 1304 if (execCallee->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters())) 1305 codePtr = functionExecutable->generatedJITCodeWithArityCheckFor(kind); 1306 else 1307 codePtr = functionExecutable->generatedJITCodeFor(kind)->addressForCall(); 1308 } 1309 CallLinkInfo& callLinkInfo = exec->codeBlock()->getCallLinkInfo(execCallee->returnPC()); 1310 if (!callLinkInfo.seenOnce()) 1311 callLinkInfo.setSeen(); 1312 else 1313 linkFor(execCallee, callLinkInfo, codeBlock, callee, codePtr, kind); 1314 return reinterpret_cast<char*>(codePtr.executableAddress()); 1315 } 1316 1317 char* DFG_OPERATION operationLinkCall(ExecState* execCallee) 1318 { 1319 return linkFor(execCallee, CodeForCall); 1320 } 1321 1322 char* DFG_OPERATION operationLinkConstruct(ExecState* execCallee) 1323 { 1324 return linkFor(execCallee, CodeForConstruct); 1325 } 1326 1327 inline char* virtualForWithFunction(ExecState* execCallee, CodeSpecializationKind kind, JSCell*& calleeAsFunctionCell) 1328 { 1329 ExecState* exec = execCallee->callerFrame(); 1330 VM* vm = &exec->vm(); 1331 NativeCallFrameTracer tracer(vm, exec); 1332 1333 JSValue calleeAsValue = execCallee->calleeAsValue(); 1334 calleeAsFunctionCell = getJSFunction(calleeAsValue); 1335 if (UNLIKELY(!calleeAsFunctionCell)) 1336 return reinterpret_cast<char*>(handleHostCall(execCallee, calleeAsValue, kind)); 1337 1338 JSFunction* function = jsCast<JSFunction*>(calleeAsFunctionCell); 1339 execCallee->setScope(function->scopeUnchecked()); 1340 ExecutableBase* executable = function->executable(); 1341 if (UNLIKELY(!executable->hasJITCodeFor(kind))) { 1342 FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable); 1343 JSObject* error = functionExecutable->prepareForExecution(execCallee, function->scope(), kind); 1344 if (error) { 1345 exec->vm().throwException(execCallee, error); 1346 return reinterpret_cast<char*>(vm->getCTIStub(throwExceptionFromCallSlowPathGenerator).code().executableAddress()); 1347 } 1348 } 1349 return reinterpret_cast<char*>(executable->generatedJITCodeWithArityCheckFor(kind).executableAddress()); 1350 } 1351 1352 inline char* virtualFor(ExecState* execCallee, CodeSpecializationKind kind) 1353 { 1354 JSCell* calleeAsFunctionCellIgnored; 1355 return virtualForWithFunction(execCallee, kind, calleeAsFunctionCellIgnored); 1356 } 1357 1358 static bool attemptToOptimizeClosureCall(ExecState* execCallee, JSCell* calleeAsFunctionCell, CallLinkInfo& callLinkInfo) 1359 { 1360 if (!calleeAsFunctionCell) 1361 return false; 1362 1363 JSFunction* callee = jsCast<JSFunction*>(calleeAsFunctionCell); 1364 JSFunction* oldCallee = callLinkInfo.callee.get(); 1365 1366 if (!oldCallee 1367 || oldCallee->structure() != callee->structure() 1368 || oldCallee->executable() != callee->executable()) 1369 return false; 1370 1371 ASSERT(callee->executable()->hasJITCodeForCall()); 1372 MacroAssemblerCodePtr codePtr = callee->executable()->generatedJITCodeForCall()->addressForCall(); 1373 1374 CodeBlock* codeBlock; 1375 if (callee->executable()->isHostFunction()) 1376 codeBlock = 0; 1377 else { 1378 codeBlock = jsCast<FunctionExecutable*>(callee->executable())->codeBlockForCall(); 1379 if (execCallee->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters())) 1380 return false; 1381 } 1382 1383 linkClosureCall( 1384 execCallee, callLinkInfo, codeBlock, 1385 callee->structure(), callee->executable(), codePtr); 1386 1387 return true; 1388 } 1389 1390 char* DFG_OPERATION operationLinkClosureCall(ExecState* execCallee) 1391 { 1392 JSCell* calleeAsFunctionCell; 1393 char* result = virtualForWithFunction(execCallee, CodeForCall, calleeAsFunctionCell); 1394 CallLinkInfo& callLinkInfo = execCallee->callerFrame()->codeBlock()->getCallLinkInfo(execCallee->returnPC()); 1395 1396 if (!attemptToOptimizeClosureCall(execCallee, calleeAsFunctionCell, callLinkInfo)) 1397 linkSlowFor(execCallee, callLinkInfo, CodeForCall); 1398 1399 return result; 1400 } 1401 1402 char* DFG_OPERATION operationVirtualCall(ExecState* execCallee) 1403 { 1404 return virtualFor(execCallee, CodeForCall); 1405 } 1406 1407 char* DFG_OPERATION operationVirtualConstruct(ExecState* execCallee) 1408 { 1409 return virtualFor(execCallee, CodeForConstruct); 1410 } 1411 1412 EncodedJSValue DFG_OPERATION operationToPrimitive(ExecState* exec, EncodedJSValue value) 598 EncodedJSValue JIT_OPERATION operationToPrimitive(ExecState* exec, EncodedJSValue value) 1413 599 { 1414 600 VM* vm = &exec->vm(); … … 1418 604 } 1419 605 1420 char* DFG_OPERATION operationNewArray(ExecState* exec, Structure* arrayStructure, void* buffer, size_t size)606 char* JIT_OPERATION operationNewArray(ExecState* exec, Structure* arrayStructure, void* buffer, size_t size) 1421 607 { 1422 608 VM* vm = &exec->vm(); … … 1426 612 } 1427 613 1428 char* DFG_OPERATION operationNewEmptyArray(ExecState* exec, Structure* arrayStructure)614 char* JIT_OPERATION operationNewEmptyArray(ExecState* exec, Structure* arrayStructure) 1429 615 { 1430 616 VM* vm = &exec->vm(); … … 1434 620 } 1435 621 1436 char* DFG_OPERATION operationNewArrayWithSize(ExecState* exec, Structure* arrayStructure, int32_t size)622 char* JIT_OPERATION operationNewArrayWithSize(ExecState* exec, Structure* arrayStructure, int32_t size) 1437 623 { 1438 624 VM* vm = &exec->vm(); … … 1445 631 } 1446 632 1447 char* DFG_OPERATION operationNewArrayBuffer(ExecState* exec, Structure* arrayStructure, size_t start, size_t size)633 char* JIT_OPERATION operationNewArrayBuffer(ExecState* exec, Structure* arrayStructure, size_t start, size_t size) 1448 634 { 1449 635 VM& vm = exec->vm(); … … 1452 638 } 1453 639 1454 char* DFG_OPERATION operationNewInt8ArrayWithSize(640 char* JIT_OPERATION operationNewInt8ArrayWithSize( 1455 641 ExecState* exec, Structure* structure, int32_t length) 1456 642 { … … 1458 644 } 1459 645 1460 char* DFG_OPERATION operationNewInt8ArrayWithOneArgument(646 char* JIT_OPERATION operationNewInt8ArrayWithOneArgument( 1461 647 ExecState* exec, Structure* structure, EncodedJSValue encodedValue) 1462 648 { … … 1464 650 } 1465 651 1466 char* DFG_OPERATION operationNewInt16ArrayWithSize(652 char* JIT_OPERATION operationNewInt16ArrayWithSize( 1467 653 ExecState* exec, Structure* structure, int32_t length) 1468 654 { … … 1470 656 } 1471 657 1472 char* DFG_OPERATION operationNewInt16ArrayWithOneArgument(658 char* JIT_OPERATION operationNewInt16ArrayWithOneArgument( 1473 659 ExecState* exec, Structure* structure, EncodedJSValue encodedValue) 1474 660 { … … 1476 662 } 1477 663 1478 char* DFG_OPERATION operationNewInt32ArrayWithSize(664 char* JIT_OPERATION operationNewInt32ArrayWithSize( 1479 665 ExecState* exec, Structure* structure, int32_t length) 1480 666 { … … 1482 668 } 1483 669 1484 char* DFG_OPERATION operationNewInt32ArrayWithOneArgument(670 char* JIT_OPERATION operationNewInt32ArrayWithOneArgument( 1485 671 ExecState* exec, Structure* structure, EncodedJSValue encodedValue) 1486 672 { … … 1488 674 } 1489 675 1490 char* DFG_OPERATION operationNewUint8ArrayWithSize(676 char* JIT_OPERATION operationNewUint8ArrayWithSize( 1491 677 ExecState* exec, Structure* structure, int32_t length) 1492 678 { … … 1494 680 } 1495 681 1496 char* DFG_OPERATION operationNewUint8ArrayWithOneArgument(682 char* JIT_OPERATION operationNewUint8ArrayWithOneArgument( 1497 683 ExecState* exec, Structure* structure, EncodedJSValue encodedValue) 1498 684 { … … 1500 686 } 1501 687 1502 char* DFG_OPERATION operationNewUint8ClampedArrayWithSize(688 char* JIT_OPERATION operationNewUint8ClampedArrayWithSize( 1503 689 ExecState* exec, Structure* structure, int32_t length) 1504 690 { … … 1506 692 } 1507 693 1508 char* DFG_OPERATION operationNewUint8ClampedArrayWithOneArgument(694 char* JIT_OPERATION operationNewUint8ClampedArrayWithOneArgument( 1509 695 ExecState* exec, Structure* structure, EncodedJSValue encodedValue) 1510 696 { … … 1512 698 } 1513 699 1514 char* DFG_OPERATION operationNewUint16ArrayWithSize(700 char* JIT_OPERATION operationNewUint16ArrayWithSize( 1515 701 ExecState* exec, Structure* structure, int32_t length) 1516 702 { … … 1518 704 } 1519 705 1520 char* DFG_OPERATION operationNewUint16ArrayWithOneArgument(706 char* JIT_OPERATION operationNewUint16ArrayWithOneArgument( 1521 707 ExecState* exec, Structure* structure, EncodedJSValue encodedValue) 1522 708 { … … 1524 710 } 1525 711 1526 char* DFG_OPERATION operationNewUint32ArrayWithSize(712 char* JIT_OPERATION operationNewUint32ArrayWithSize( 1527 713 ExecState* exec, Structure* structure, int32_t length) 1528 714 { … … 1530 716 } 1531 717 1532 char* DFG_OPERATION operationNewUint32ArrayWithOneArgument(718 char* JIT_OPERATION operationNewUint32ArrayWithOneArgument( 1533 719 ExecState* exec, Structure* structure, EncodedJSValue encodedValue) 1534 720 { … … 1536 722 } 1537 723 1538 char* DFG_OPERATION operationNewFloat32ArrayWithSize(724 char* JIT_OPERATION operationNewFloat32ArrayWithSize( 1539 725 ExecState* exec, Structure* structure, int32_t length) 1540 726 { … … 1542 728 } 1543 729 1544 char* DFG_OPERATION operationNewFloat32ArrayWithOneArgument(730 char* JIT_OPERATION operationNewFloat32ArrayWithOneArgument( 1545 731 ExecState* exec, Structure* structure, EncodedJSValue encodedValue) 1546 732 { … … 1548 734 } 1549 735 1550 char* DFG_OPERATION operationNewFloat64ArrayWithSize(736 char* JIT_OPERATION operationNewFloat64ArrayWithSize( 1551 737 ExecState* exec, Structure* structure, int32_t length) 1552 738 { … … 1554 740 } 1555 741 1556 char* DFG_OPERATION operationNewFloat64ArrayWithOneArgument(742 char* JIT_OPERATION operationNewFloat64ArrayWithOneArgument( 1557 743 ExecState* exec, Structure* structure, EncodedJSValue encodedValue) 1558 744 { … … 1560 746 } 1561 747 1562 EncodedJSValue DFG_OPERATION operationNewRegexp(ExecState* exec, void* regexpPtr)748 EncodedJSValue JIT_OPERATION operationNewRegexp(ExecState* exec, void* regexpPtr) 1563 749 { 1564 750 VM& vm = exec->vm(); … … 1573 759 } 1574 760 1575 JSCell* DFG_OPERATION operationCreateActivation(ExecState* exec)761 JSCell* JIT_OPERATION operationCreateActivation(ExecState* exec) 1576 762 { 1577 763 VM& vm = exec->vm(); … … 1582 768 } 1583 769 1584 JSCell* DFG_OPERATION operationCreateArguments(ExecState* exec)770 JSCell* JIT_OPERATION operationCreateArguments(ExecState* exec) 1585 771 { 1586 772 VM& vm = exec->vm(); … … 1593 779 } 1594 780 1595 JSCell* DFG_OPERATION operationCreateInlinedArguments(781 JSCell* JIT_OPERATION operationCreateInlinedArguments( 1596 782 ExecState* exec, InlineCallFrame* inlineCallFrame) 1597 783 { … … 1605 791 } 1606 792 1607 void DFG_OPERATION operationTearOffArguments(ExecState* exec, JSCell* argumentsCell, JSCell* activationCell)793 void JIT_OPERATION operationTearOffArguments(ExecState* exec, JSCell* argumentsCell, JSCell* activationCell) 1608 794 { 1609 795 ASSERT(exec->codeBlock()->usesArguments()); … … 1615 801 } 1616 802 1617 void DFG_OPERATION operationTearOffInlinedArguments(803 void JIT_OPERATION operationTearOffInlinedArguments( 1618 804 ExecState* exec, JSCell* argumentsCell, JSCell* activationCell, InlineCallFrame* inlineCallFrame) 1619 805 { … … 1622 808 } 1623 809 1624 EncodedJSValue DFG_OPERATION operationGetArgumentsLength(ExecState* exec, int32_t argumentsRegister)810 EncodedJSValue JIT_OPERATION operationGetArgumentsLength(ExecState* exec, int32_t argumentsRegister) 1625 811 { 1626 812 VM& vm = exec->vm(); … … 1634 820 } 1635 821 1636 EncodedJSValue DFG_OPERATION operationGetArgumentByVal(ExecState* exec, int32_t argumentsRegister, int32_t index)822 EncodedJSValue JIT_OPERATION operationGetArgumentByVal(ExecState* exec, int32_t argumentsRegister, int32_t index) 1637 823 { 1638 824 VM& vm = exec->vm(); … … 1649 835 } 1650 836 1651 EncodedJSValue DFG_OPERATION operationGetInlinedArgumentByVal(837 EncodedJSValue JIT_OPERATION operationGetInlinedArgumentByVal( 1652 838 ExecState* exec, int32_t argumentsRegister, InlineCallFrame* inlineCallFrame, int32_t index) 1653 839 { … … 1667 853 } 1668 854 1669 JSCell* DFG_OPERATION operationNewFunctionNoCheck(ExecState* exec, JSCell* functionExecutable)855 JSCell* JIT_OPERATION operationNewFunctionNoCheck(ExecState* exec, JSCell* functionExecutable) 1670 856 { 1671 857 ASSERT(functionExecutable->inherits(FunctionExecutable::info())); … … 1675 861 } 1676 862 1677 EncodedJSValue DFG_OPERATION operationNewFunction(ExecState* exec, JSCell* functionExecutable)863 EncodedJSValue JIT_OPERATION operationNewFunction(ExecState* exec, JSCell* functionExecutable) 1678 864 { 1679 865 ASSERT(functionExecutable->inherits(FunctionExecutable::info())); … … 1683 869 } 1684 870 1685 JSCell* DFG_OPERATION operationNewFunctionExpression(ExecState* exec, JSCell* functionExecutableAsCell)871 JSCell* JIT_OPERATION operationNewFunctionExpression(ExecState* exec, JSCell* functionExecutableAsCell) 1686 872 { 1687 873 ASSERT(functionExecutableAsCell->inherits(FunctionExecutable::info())); … … 1695 881 } 1696 882 1697 size_t DFG_OPERATION operationIsObject(ExecState* exec, EncodedJSValue value)883 size_t JIT_OPERATION operationIsObject(ExecState* exec, EncodedJSValue value) 1698 884 { 1699 885 return jsIsObjectType(exec, JSValue::decode(value)); 1700 886 } 1701 887 1702 size_t DFG_OPERATION operationIsFunction(EncodedJSValue value)888 size_t JIT_OPERATION operationIsFunction(EncodedJSValue value) 1703 889 { 1704 890 return jsIsFunctionType(JSValue::decode(value)); 1705 891 } 1706 892 1707 JSCell* DFG_OPERATION operationTypeOf(ExecState* exec, JSCell* value)893 JSCell* JIT_OPERATION operationTypeOf(ExecState* exec, JSCell* value) 1708 894 { 1709 895 return jsTypeStringForValue(exec, JSValue(value)).asCell(); 1710 896 } 1711 897 1712 void DFG_OPERATION operationReallocateStorageAndFinishPut(ExecState* exec, JSObject* base, Structure* structure, PropertyOffset offset, EncodedJSValue value) 1713 { 1714 VM& vm = exec->vm(); 1715 NativeCallFrameTracer tracer(&vm, exec); 1716 1717 ASSERT(structure->outOfLineCapacity() > base->structure()->outOfLineCapacity()); 1718 ASSERT(!vm.heap.storageAllocator().fastPathShouldSucceed(structure->outOfLineCapacity() * sizeof(JSValue))); 1719 base->setStructureAndReallocateStorageIfNecessary(vm, structure); 1720 base->putDirect(vm, offset, JSValue::decode(value)); 1721 } 1722 1723 char* DFG_OPERATION operationAllocatePropertyStorageWithInitialCapacity(ExecState* exec) 898 char* JIT_OPERATION operationAllocatePropertyStorageWithInitialCapacity(ExecState* exec) 1724 899 { 1725 900 VM& vm = exec->vm(); … … 1730 905 } 1731 906 1732 char* DFG_OPERATION operationAllocatePropertyStorage(ExecState* exec, size_t newSize)907 char* JIT_OPERATION operationAllocatePropertyStorage(ExecState* exec, size_t newSize) 1733 908 { 1734 909 VM& vm = exec->vm(); … … 1739 914 } 1740 915 1741 char* DFG_OPERATION operationReallocateButterflyToHavePropertyStorageWithInitialCapacity(ExecState* exec, JSObject* object)916 char* JIT_OPERATION operationReallocateButterflyToHavePropertyStorageWithInitialCapacity(ExecState* exec, JSObject* object) 1742 917 { 1743 918 VM& vm = exec->vm(); … … 1750 925 } 1751 926 1752 char* DFG_OPERATION operationReallocateButterflyToGrowPropertyStorage(ExecState* exec, JSObject* object, size_t newSize)927 char* JIT_OPERATION operationReallocateButterflyToGrowPropertyStorage(ExecState* exec, JSObject* object, size_t newSize) 1753 928 { 1754 929 VM& vm = exec->vm(); … … 1760 935 } 1761 936 1762 char* DFG_OPERATION operationEnsureInt32(ExecState* exec, JSCell* cell)937 char* JIT_OPERATION operationEnsureInt32(ExecState* exec, JSCell* cell) 1763 938 { 1764 939 VM& vm = exec->vm(); … … 1771 946 } 1772 947 1773 char* DFG_OPERATION operationEnsureDouble(ExecState* exec, JSCell* cell)948 char* JIT_OPERATION operationEnsureDouble(ExecState* exec, JSCell* cell) 1774 949 { 1775 950 VM& vm = exec->vm(); … … 1782 957 } 1783 958 1784 char* DFG_OPERATION operationEnsureContiguous(ExecState* exec, JSCell* cell)959 char* JIT_OPERATION operationEnsureContiguous(ExecState* exec, JSCell* cell) 1785 960 { 1786 961 VM& vm = exec->vm(); … … 1793 968 } 1794 969 1795 char* DFG_OPERATION operationRageEnsureContiguous(ExecState* exec, JSCell* cell)970 char* JIT_OPERATION operationRageEnsureContiguous(ExecState* exec, JSCell* cell) 1796 971 { 1797 972 VM& vm = exec->vm(); … … 1804 979 } 1805 980 1806 char* DFG_OPERATION operationEnsureArrayStorage(ExecState* exec, JSCell* cell)981 char* JIT_OPERATION operationEnsureArrayStorage(ExecState* exec, JSCell* cell) 1807 982 { 1808 983 VM& vm = exec->vm(); … … 1815 990 } 1816 991 1817 StringImpl* DFG_OPERATION operationResolveRope(ExecState* exec, JSString* string)992 StringImpl* JIT_OPERATION operationResolveRope(ExecState* exec, JSString* string) 1818 993 { 1819 994 VM& vm = exec->vm(); … … 1823 998 } 1824 999 1825 JSString* DFG_OPERATION operationSingleCharacterString(ExecState* exec, int32_t character)1000 JSString* JIT_OPERATION operationSingleCharacterString(ExecState* exec, int32_t character) 1826 1001 { 1827 1002 VM& vm = exec->vm(); … … 1831 1006 } 1832 1007 1833 JSCell* DFG_OPERATION operationNewStringObject(ExecState* exec, JSString* string, Structure* structure)1008 JSCell* JIT_OPERATION operationNewStringObject(ExecState* exec, JSString* string, Structure* structure) 1834 1009 { 1835 1010 VM& vm = exec->vm(); … … 1839 1014 } 1840 1015 1841 JSCell* DFG_OPERATION operationToStringOnCell(ExecState* exec, JSCell* cell)1016 JSCell* JIT_OPERATION operationToStringOnCell(ExecState* exec, JSCell* cell) 1842 1017 { 1843 1018 VM& vm = exec->vm(); … … 1847 1022 } 1848 1023 1849 JSCell* DFG_OPERATION operationToString(ExecState* exec, EncodedJSValue value)1024 JSCell* JIT_OPERATION operationToString(ExecState* exec, EncodedJSValue value) 1850 1025 { 1851 1026 VM& vm = exec->vm(); … … 1855 1030 } 1856 1031 1857 JSCell* DFG_OPERATION operationMakeRope2(ExecState* exec, JSString* left, JSString* right)1032 JSCell* JIT_OPERATION operationMakeRope2(ExecState* exec, JSString* left, JSString* right) 1858 1033 { 1859 1034 VM& vm = exec->vm(); … … 1863 1038 } 1864 1039 1865 JSCell* DFG_OPERATION operationMakeRope3(ExecState* exec, JSString* a, JSString* b, JSString* c)1040 JSCell* JIT_OPERATION operationMakeRope3(ExecState* exec, JSString* a, JSString* b, JSString* c) 1866 1041 { 1867 1042 VM& vm = exec->vm(); … … 1871 1046 } 1872 1047 1873 char* DFG_OPERATION operationFindSwitchImmTargetForDouble(1048 char* JIT_OPERATION operationFindSwitchImmTargetForDouble( 1874 1049 ExecState* exec, EncodedJSValue encodedValue, size_t tableIndex) 1875 1050 { … … 1885 1060 } 1886 1061 1887 char* DFG_OPERATION operationSwitchString(ExecState* exec, size_t tableIndex, JSString* string)1062 char* JIT_OPERATION operationSwitchString(ExecState* exec, size_t tableIndex, JSString* string) 1888 1063 { 1889 1064 VM& vm = exec->vm(); … … 1893 1068 } 1894 1069 1895 double DFG_OPERATION operationFModOnInts(int32_t a, int32_t b)1070 double JIT_OPERATION operationFModOnInts(int32_t a, int32_t b) 1896 1071 { 1897 1072 return fmod(a, b); 1898 1073 } 1899 1074 1900 JSCell* DFG_OPERATION operationStringFromCharCode(ExecState* exec, int32_t op1)1075 JSCell* JIT_OPERATION operationStringFromCharCode(ExecState* exec, int32_t op1) 1901 1076 { 1902 1077 VM* vm = &exec->vm(); … … 1905 1080 } 1906 1081 1907 DFGHandlerEncoded DFG_OPERATION lookupExceptionHandler(ExecState* exec) 1908 { 1909 VM* vm = &exec->vm(); 1910 NativeCallFrameTracer tracer(vm, exec); 1911 1912 JSValue exceptionValue = exec->exception(); 1913 ASSERT(exceptionValue); 1914 1915 ExceptionHandler handler = genericUnwind(vm, exec, exceptionValue); 1916 ASSERT(handler.catchRoutine); 1917 return dfgHandlerEncoded(handler.callFrame, handler.catchRoutine); 1918 } 1919 1920 size_t DFG_OPERATION dfgConvertJSValueToInt32(ExecState* exec, EncodedJSValue value) 1082 size_t JIT_OPERATION dfgConvertJSValueToInt32(ExecState* exec, EncodedJSValue value) 1921 1083 { 1922 1084 VM* vm = &exec->vm(); … … 1927 1089 } 1928 1090 1929 size_t DFG_OPERATION dfgConvertJSValueToBoolean(ExecState* exec, EncodedJSValue encodedOp)1091 size_t JIT_OPERATION dfgConvertJSValueToBoolean(ExecState* exec, EncodedJSValue encodedOp) 1930 1092 { 1931 1093 VM* vm = &exec->vm(); … … 1935 1097 } 1936 1098 1937 void DFG_OPERATION debugOperationPrintSpeculationFailure(ExecState* exec, void* debugInfoRaw, void* scratch)1099 void JIT_OPERATION debugOperationPrintSpeculationFailure(ExecState* exec, void* debugInfoRaw, void* scratch) 1938 1100 { 1939 1101 VM* vm = &exec->vm(); … … 1973 1135 } 1974 1136 1975 extern "C" void DFG_OPERATION triggerReoptimizationNow(CodeBlock* codeBlock)1137 extern "C" void JIT_OPERATION triggerReoptimizationNow(CodeBlock* codeBlock) 1976 1138 { 1977 1139 // It's sort of preferable that we don't GC while in here. Anyways, doing so wouldn't … … 2017 1179 2018 1180 #if ENABLE(FTL_JIT) 2019 void DFG_OPERATION triggerTierUpNow(ExecState* exec)1181 void JIT_OPERATION triggerTierUpNow(ExecState* exec) 2020 1182 { 2021 1183 VM* vm = &exec->vm(); … … 2079 1241 } 2080 1242 2081 char* DFG_OPERATION triggerOSREntryNow(1243 char* JIT_OPERATION triggerOSREntryNow( 2082 1244 ExecState* exec, int32_t bytecodeIndex, int32_t streamIndex) 2083 1245 { … … 2198 1360 // FIXME: Make calls work well. Currently they're a pure regression. 2199 1361 // https://bugs.webkit.org/show_bug.cgi?id=113621 2200 EncodedJSValue DFG_OPERATION operationFTLCall(ExecState* exec)1362 EncodedJSValue JIT_OPERATION operationFTLCall(ExecState* exec) 2201 1363 { 2202 1364 ExecState* callerExec = exec->callerFrame(); … … 2218 1380 // FIXME: Make calls work well. Currently they're a pure regression. 2219 1381 // https://bugs.webkit.org/show_bug.cgi?id=113621 2220 EncodedJSValue DFG_OPERATION operationFTLConstruct(ExecState* exec)1382 EncodedJSValue JIT_OPERATION operationFTLConstruct(ExecState* exec) 2221 1383 { 2222 1384 ExecState* callerExec = exec->callerFrame(); … … 2242 1404 #endif // ENABLE(DFG_JIT) 2243 1405 2244 namespace JSC {2245 2246 #if COMPILER(GCC) && CPU(X86_64)2247 asm (2248 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"2249 HIDE_SYMBOL(getHostCallReturnValue) "\n"2250 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"2251 "mov 40(%r13), %r13\n"2252 "mov %r13, %rdi\n"2253 "jmp " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"2254 );2255 #elif COMPILER(GCC) && CPU(X86)2256 asm (2257 ".text" "\n" \2258 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"2259 HIDE_SYMBOL(getHostCallReturnValue) "\n"2260 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"2261 "mov 40(%edi), %edi\n"2262 "mov %edi, 4(%esp)\n"2263 "jmp " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"2264 );2265 #elif COMPILER(GCC) && CPU(ARM_THUMB2)2266 asm (2267 ".text" "\n"2268 ".align 2" "\n"2269 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"2270 HIDE_SYMBOL(getHostCallReturnValue) "\n"2271 ".thumb" "\n"2272 ".thumb_func " THUMB_FUNC_PARAM(getHostCallReturnValue) "\n"2273 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"2274 "ldr r5, [r5, #40]" "\n"2275 "mov r0, r5" "\n"2276 "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"2277 );2278 #elif COMPILER(GCC) && CPU(ARM_TRADITIONAL)2279 asm (2280 ".text" "\n"2281 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"2282 HIDE_SYMBOL(getHostCallReturnValue) "\n"2283 INLINE_ARM_FUNCTION(getHostCallReturnValue)2284 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"2285 "ldr r5, [r5, #40]" "\n"2286 "mov r0, r5" "\n"2287 "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"2288 );2289 #elif COMPILER(GCC) && CPU(MIPS)2290 asm(2291 ".text" "\n"2292 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"2293 HIDE_SYMBOL(getHostCallReturnValue) "\n"2294 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"2295 LOAD_FUNCTION_TO_T9(getHostCallReturnValueWithExecState)2296 "lw $s0, 40($s0)" "\n"2297 "move $a0, $s0" "\n"2298 "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n"2299 );2300 #elif COMPILER(GCC) && CPU(SH4)2301 asm(2302 ".text" "\n"2303 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"2304 HIDE_SYMBOL(getHostCallReturnValue) "\n"2305 SYMBOL_STRING(getHostCallReturnValue) ":" "\n"2306 "add #40, r14" "\n"2307 "mov.l @r14, r14" "\n"2308 "mov r14, r4" "\n"2309 "mov.l 2f, " SH4_SCRATCH_REGISTER "\n"2310 "braf " SH4_SCRATCH_REGISTER "\n"2311 "nop" "\n"2312 "1: .balign 4" "\n"2313 "2: .long " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "-1b\n"2314 );2315 #endif2316 2317 extern "C" EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValueWithExecState(ExecState* exec)2318 {2319 if (!exec)2320 return JSValue::encode(JSValue());2321 return JSValue::encode(exec->vm().hostCallReturnValue);2322 }2323 2324 } // namespace JSC2325 2326 1406 #endif // ENABLE(JIT) -
trunk/Source/JavaScriptCore/dfg/DFGOperations.h
r156300 r156490 30 30 31 31 #include "DFGJITCompiler.h" 32 #include "JITOperations.h" 32 33 #include "PutKind.h" 33 34 … … 38 39 extern "C" { 39 40 40 #if CALLING_CONVENTION_IS_STDCALL 41 #define DFG_OPERATION CDECL 41 JSCell* JIT_OPERATION operationStringFromCharCode(ExecState*, int32_t) WTF_INTERNAL; 42 43 // These routines are provide callbacks out to C++ implementations of operations too complex to JIT. 44 JSCell* JIT_OPERATION operationNewObject(ExecState*, Structure*) WTF_INTERNAL; 45 JSCell* JIT_OPERATION operationCreateThis(ExecState*, JSObject* constructor, int32_t inlineCapacity) WTF_INTERNAL; 46 EncodedJSValue JIT_OPERATION operationToThis(ExecState*, EncodedJSValue encodedOp1) WTF_INTERNAL; 47 EncodedJSValue JIT_OPERATION operationToThisStrict(ExecState*, EncodedJSValue encodedOp1) WTF_INTERNAL; 48 EncodedJSValue JIT_OPERATION operationValueAdd(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL; 49 EncodedJSValue JIT_OPERATION operationValueAddNotNumber(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL; 50 EncodedJSValue JIT_OPERATION operationGetByVal(ExecState*, EncodedJSValue encodedBase, EncodedJSValue encodedProperty) WTF_INTERNAL; 51 EncodedJSValue JIT_OPERATION operationGetByValCell(ExecState*, JSCell*, EncodedJSValue encodedProperty) WTF_INTERNAL; 52 EncodedJSValue JIT_OPERATION operationGetByValArrayInt(ExecState*, JSArray*, int32_t) WTF_INTERNAL; 53 EncodedJSValue JIT_OPERATION operationGetByValStringInt(ExecState*, JSString*, int32_t) WTF_INTERNAL; 54 EncodedJSValue JIT_OPERATION operationToPrimitive(ExecState*, EncodedJSValue) WTF_INTERNAL; 55 char* JIT_OPERATION operationNewArray(ExecState*, Structure*, void*, size_t) WTF_INTERNAL; 56 char* JIT_OPERATION operationNewArrayBuffer(ExecState*, Structure*, size_t, size_t) WTF_INTERNAL; 57 char* JIT_OPERATION operationNewEmptyArray(ExecState*, Structure*) WTF_INTERNAL; 58 char* JIT_OPERATION operationNewArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 59 char* JIT_OPERATION operationNewInt8ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 60 char* JIT_OPERATION operationNewInt8ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL; 61 char* JIT_OPERATION operationNewInt16ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 62 char* JIT_OPERATION operationNewInt16ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL; 63 char* JIT_OPERATION operationNewInt32ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 64 char* JIT_OPERATION operationNewInt32ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL; 65 char* JIT_OPERATION operationNewUint8ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 66 char* JIT_OPERATION operationNewUint8ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL; 67 char* JIT_OPERATION operationNewUint8ClampedArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 68 char* JIT_OPERATION operationNewUint8ClampedArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL; 69 char* JIT_OPERATION operationNewUint16ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 70 char* JIT_OPERATION operationNewUint16ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL; 71 char* JIT_OPERATION operationNewUint32ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 72 char* JIT_OPERATION operationNewUint32ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL; 73 char* JIT_OPERATION operationNewFloat32ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 74 char* JIT_OPERATION operationNewFloat32ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL; 75 char* JIT_OPERATION operationNewFloat64ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 76 char* JIT_OPERATION operationNewFloat64ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL; 77 EncodedJSValue JIT_OPERATION operationNewRegexp(ExecState*, void*) WTF_INTERNAL; 78 void JIT_OPERATION operationPutByValStrict(ExecState*, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue) WTF_INTERNAL; 79 void JIT_OPERATION operationPutByValNonStrict(ExecState*, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue) WTF_INTERNAL; 80 void JIT_OPERATION operationPutByValCellStrict(ExecState*, JSCell*, EncodedJSValue encodedProperty, EncodedJSValue encodedValue) WTF_INTERNAL; 81 void JIT_OPERATION operationPutByValCellNonStrict(ExecState*, JSCell*, EncodedJSValue encodedProperty, EncodedJSValue encodedValue) WTF_INTERNAL; 82 void JIT_OPERATION operationPutByValBeyondArrayBoundsStrict(ExecState*, JSObject*, int32_t index, EncodedJSValue encodedValue) WTF_INTERNAL; 83 void JIT_OPERATION operationPutByValBeyondArrayBoundsNonStrict(ExecState*, JSObject*, int32_t index, EncodedJSValue encodedValue) WTF_INTERNAL; 84 void JIT_OPERATION operationPutDoubleByValBeyondArrayBoundsStrict(ExecState*, JSObject*, int32_t index, double value) WTF_INTERNAL; 85 void JIT_OPERATION operationPutDoubleByValBeyondArrayBoundsNonStrict(ExecState*, JSObject*, int32_t index, double value) WTF_INTERNAL; 86 EncodedJSValue JIT_OPERATION operationArrayPush(ExecState*, EncodedJSValue encodedValue, JSArray*) WTF_INTERNAL; 87 EncodedJSValue JIT_OPERATION operationArrayPushDouble(ExecState*, double value, JSArray*) WTF_INTERNAL; 88 EncodedJSValue JIT_OPERATION operationArrayPop(ExecState*, JSArray*) WTF_INTERNAL; 89 EncodedJSValue JIT_OPERATION operationArrayPopAndRecoverLength(ExecState*, JSArray*) WTF_INTERNAL; 90 EncodedJSValue JIT_OPERATION operationRegExpExec(ExecState*, JSCell*, JSCell*) WTF_INTERNAL; 91 // These comparisons return a boolean within a size_t such that the value is zero extended to fill the register. 92 size_t JIT_OPERATION operationRegExpTest(ExecState*, JSCell*, JSCell*) WTF_INTERNAL; 93 size_t JIT_OPERATION operationCompareLess(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL; 94 size_t JIT_OPERATION operationCompareLessEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL; 95 size_t JIT_OPERATION operationCompareGreater(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL; 96 size_t JIT_OPERATION operationCompareGreaterEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL; 97 size_t JIT_OPERATION operationCompareEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL; 98 #if USE(JSVALUE64) 99 EncodedJSValue JIT_OPERATION operationCompareStringEq(ExecState*, JSCell* left, JSCell* right) WTF_INTERNAL; 42 100 #else 43 #define DFG_OPERATION 101 size_t JIT_OPERATION operationCompareStringEq(ExecState*, JSCell* left, JSCell* right) WTF_INTERNAL; 44 102 #endif 45 46 // These typedefs provide typechecking when generating calls out to helper routines; 47 // this helps prevent calling a helper routine with the wrong arguments! 48 /* 49 Key: 50 V: void 51 J: JSValue 52 P: pointer (void*) 53 C: JSCell* 54 A: JSArray* 55 S: size_t 56 Z: int32_t 57 D: double 58 I: StringImpl* 59 */ 60 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_E)(ExecState*); 61 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EA)(ExecState*, JSArray*); 62 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EAZ)(ExecState*, JSArray*, int32_t); 63 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EC)(ExecState*, JSCell*); 64 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_ECC)(ExecState*, JSCell*, JSCell*); 65 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_ECI)(ExecState*, JSCell*, StringImpl*); 66 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_ECJ)(ExecState*, JSCell*, EncodedJSValue); 67 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EDA)(ExecState*, double, JSArray*); 68 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EI)(ExecState*, StringImpl*); 69 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EJ)(ExecState*, EncodedJSValue); 70 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EJA)(ExecState*, EncodedJSValue, JSArray*); 71 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EJI)(ExecState*, EncodedJSValue, StringImpl*); 72 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EJJ)(ExecState*, EncodedJSValue, EncodedJSValue); 73 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EJssZ)(ExecState*, JSString*, int32_t); 74 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EJP)(ExecState*, EncodedJSValue, void*); 75 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EP)(ExecState*, void*); 76 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EPP)(ExecState*, void*, void*); 77 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EPS)(ExecState*, void*, size_t); 78 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_ESS)(ExecState*, size_t, size_t); 79 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EZ)(ExecState*, int32_t); 80 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EZIcfZ)(ExecState*, int32_t, InlineCallFrame*, int32_t); 81 typedef EncodedJSValue DFG_OPERATION (*J_DFGOperation_EZZ)(ExecState*, int32_t, int32_t); 82 typedef JSCell* DFG_OPERATION (*C_DFGOperation_E)(ExecState*); 83 typedef JSCell* DFG_OPERATION (*C_DFGOperation_EZ)(ExecState*, int32_t); 84 typedef JSCell* DFG_OPERATION (*C_DFGOperation_EC)(ExecState*, JSCell*); 85 typedef JSCell* DFG_OPERATION (*C_DFGOperation_ECC)(ExecState*, JSCell*, JSCell*); 86 typedef JSCell* DFG_OPERATION (*C_DFGOperation_EIcf)(ExecState*, InlineCallFrame*); 87 typedef JSCell* DFG_OPERATION (*C_DFGOperation_EJ)(ExecState*, EncodedJSValue); 88 typedef JSCell* DFG_OPERATION (*C_DFGOperation_EJssSt)(ExecState*, JSString*, Structure*); 89 typedef JSCell* DFG_OPERATION (*C_DFGOperation_EJssJss)(ExecState*, JSString*, JSString*); 90 typedef JSCell* DFG_OPERATION (*C_DFGOperation_EJssJssJss)(ExecState*, JSString*, JSString*, JSString*); 91 typedef JSCell* DFG_OPERATION (*C_DFGOperation_EOZ)(ExecState*, JSObject*, int32_t); 92 typedef JSCell* DFG_OPERATION (*C_DFGOperation_ESt)(ExecState*, Structure*); 93 typedef JSCell* DFG_OPERATION (*C_DFGOperation_EZ)(ExecState*, int32_t); 94 typedef double DFG_OPERATION (*D_DFGOperation_DD)(double, double); 95 typedef double DFG_OPERATION (*D_DFGOperation_ZZ)(int32_t, int32_t); 96 typedef double DFG_OPERATION (*D_DFGOperation_EJ)(ExecState*, EncodedJSValue); 97 typedef int32_t DFG_OPERATION (*Z_DFGOperation_D)(double); 98 typedef size_t DFG_OPERATION (*S_DFGOperation_ECC)(ExecState*, JSCell*, JSCell*); 99 typedef size_t DFG_OPERATION (*S_DFGOperation_EJ)(ExecState*, EncodedJSValue); 100 typedef size_t DFG_OPERATION (*S_DFGOperation_EJJ)(ExecState*, EncodedJSValue, EncodedJSValue); 101 typedef size_t DFG_OPERATION (*S_DFGOperation_J)(EncodedJSValue); 102 typedef void DFG_OPERATION (*V_DFGOperation_E)(ExecState*); 103 typedef void DFG_OPERATION (*V_DFGOperation_EOZD)(ExecState*, JSObject*, int32_t, double); 104 typedef void DFG_OPERATION (*V_DFGOperation_EOZJ)(ExecState*, JSObject*, int32_t, EncodedJSValue); 105 typedef void DFG_OPERATION (*V_DFGOperation_EC)(ExecState*, JSCell*); 106 typedef void DFG_OPERATION (*V_DFGOperation_ECIcf)(ExecState*, JSCell*, InlineCallFrame*); 107 typedef void DFG_OPERATION (*V_DFGOperation_ECCIcf)(ExecState*, JSCell*, JSCell*, InlineCallFrame*); 108 typedef void DFG_OPERATION (*V_DFGOperation_ECJJ)(ExecState*, JSCell*, EncodedJSValue, EncodedJSValue); 109 typedef void DFG_OPERATION (*V_DFGOperation_ECZ)(ExecState*, JSCell*, int32_t); 110 typedef void DFG_OPERATION (*V_DFGOperation_ECC)(ExecState*, JSCell*, JSCell*); 111 typedef void DFG_OPERATION (*V_DFGOperation_EJCI)(ExecState*, EncodedJSValue, JSCell*, StringImpl*); 112 typedef void DFG_OPERATION (*V_DFGOperation_EJJJ)(ExecState*, EncodedJSValue, EncodedJSValue, EncodedJSValue); 113 typedef void DFG_OPERATION (*V_DFGOperation_EJPP)(ExecState*, EncodedJSValue, void*, void*); 114 typedef void DFG_OPERATION (*V_DFGOperation_EPZJ)(ExecState*, void*, int32_t, EncodedJSValue); 115 typedef void DFG_OPERATION (*V_DFGOperation_W)(WatchpointSet*); 116 typedef char* DFG_OPERATION (*P_DFGOperation_E)(ExecState*); 117 typedef char* DFG_OPERATION (*P_DFGOperation_EC)(ExecState*, JSCell*); 118 typedef char* DFG_OPERATION (*P_DFGOperation_EJS)(ExecState*, EncodedJSValue, size_t); 119 typedef char* DFG_OPERATION (*P_DFGOperation_EO)(ExecState*, JSObject*); 120 typedef char* DFG_OPERATION (*P_DFGOperation_EOS)(ExecState*, JSObject*, size_t); 121 typedef char* DFG_OPERATION (*P_DFGOperation_EOZ)(ExecState*, JSObject*, int32_t); 122 typedef char* DFG_OPERATION (*P_DFGOperation_EPS)(ExecState*, void*, size_t); 123 typedef char* DFG_OPERATION (*P_DFGOperation_ES)(ExecState*, size_t); 124 typedef char* DFG_OPERATION (*P_DFGOperation_ESJss)(ExecState*, size_t, JSString*); 125 typedef char* DFG_OPERATION (*P_DFGOperation_ESt)(ExecState*, Structure*); 126 typedef char* DFG_OPERATION (*P_DFGOperation_EStJ)(ExecState*, Structure*, EncodedJSValue); 127 typedef char* DFG_OPERATION (*P_DFGOperation_EStPS)(ExecState*, Structure*, void*, size_t); 128 typedef char* DFG_OPERATION (*P_DFGOperation_EStSS)(ExecState*, Structure*, size_t, size_t); 129 typedef char* DFG_OPERATION (*P_DFGOperation_EStZ)(ExecState*, Structure*, int32_t); 130 typedef char* DFG_OPERATION (*P_DFGOperation_EZZ)(ExecState*, int32_t, int32_t); 131 typedef StringImpl* DFG_OPERATION (*I_DFGOperation_EJss)(ExecState*, JSString*); 132 typedef JSString* DFG_OPERATION (*Jss_DFGOperation_EZ)(ExecState*, int32_t); 133 JSCell* DFG_OPERATION operationStringFromCharCode(ExecState*, int32_t) WTF_INTERNAL; 134 135 // These routines are provide callbacks out to C++ implementations of operations too complex to JIT. 136 JSCell* DFG_OPERATION operationNewObject(ExecState*, Structure*) WTF_INTERNAL; 137 JSCell* DFG_OPERATION operationCreateThis(ExecState*, JSObject* constructor, int32_t inlineCapacity) WTF_INTERNAL; 138 EncodedJSValue DFG_OPERATION operationToThis(ExecState*, EncodedJSValue encodedOp1) WTF_INTERNAL; 139 EncodedJSValue DFG_OPERATION operationToThisStrict(ExecState*, EncodedJSValue encodedOp1) WTF_INTERNAL; 140 EncodedJSValue DFG_OPERATION operationValueAdd(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL; 141 EncodedJSValue DFG_OPERATION operationValueAddNotNumber(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL; 142 EncodedJSValue DFG_OPERATION operationGetByVal(ExecState*, EncodedJSValue encodedBase, EncodedJSValue encodedProperty) WTF_INTERNAL; 143 EncodedJSValue DFG_OPERATION operationGetByValCell(ExecState*, JSCell*, EncodedJSValue encodedProperty) WTF_INTERNAL; 144 EncodedJSValue DFG_OPERATION operationGetByValArrayInt(ExecState*, JSArray*, int32_t) WTF_INTERNAL; 145 EncodedJSValue DFG_OPERATION operationGetByValStringInt(ExecState*, JSString*, int32_t) WTF_INTERNAL; 146 EncodedJSValue DFG_OPERATION operationGetById(ExecState*, EncodedJSValue, StringImpl*) WTF_INTERNAL; 147 EncodedJSValue DFG_OPERATION operationGetByIdBuildList(ExecState*, EncodedJSValue, StringImpl*) WTF_INTERNAL; 148 EncodedJSValue DFG_OPERATION operationGetByIdOptimize(ExecState*, EncodedJSValue, StringImpl*) WTF_INTERNAL; 149 EncodedJSValue DFG_OPERATION operationInOptimize(ExecState*, JSCell*, StringImpl*); 150 EncodedJSValue DFG_OPERATION operationIn(ExecState*, JSCell*, StringImpl*); 151 EncodedJSValue DFG_OPERATION operationGenericIn(ExecState*, JSCell*, EncodedJSValue); 152 EncodedJSValue DFG_OPERATION operationCallCustomGetter(ExecState*, JSCell*, PropertySlot::GetValueFunc, StringImpl*) WTF_INTERNAL; 153 EncodedJSValue DFG_OPERATION operationCallGetter(ExecState*, JSCell*, JSCell*) WTF_INTERNAL; 154 EncodedJSValue DFG_OPERATION operationToPrimitive(ExecState*, EncodedJSValue) WTF_INTERNAL; 155 char* DFG_OPERATION operationNewArray(ExecState*, Structure*, void*, size_t) WTF_INTERNAL; 156 char* DFG_OPERATION operationNewArrayBuffer(ExecState*, Structure*, size_t, size_t) WTF_INTERNAL; 157 char* DFG_OPERATION operationNewEmptyArray(ExecState*, Structure*) WTF_INTERNAL; 158 char* DFG_OPERATION operationNewArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 159 char* DFG_OPERATION operationNewInt8ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 160 char* DFG_OPERATION operationNewInt8ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL; 161 char* DFG_OPERATION operationNewInt16ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 162 char* DFG_OPERATION operationNewInt16ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL; 163 char* DFG_OPERATION operationNewInt32ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 164 char* DFG_OPERATION operationNewInt32ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL; 165 char* DFG_OPERATION operationNewUint8ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 166 char* DFG_OPERATION operationNewUint8ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL; 167 char* DFG_OPERATION operationNewUint8ClampedArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 168 char* DFG_OPERATION operationNewUint8ClampedArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL; 169 char* DFG_OPERATION operationNewUint16ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 170 char* DFG_OPERATION operationNewUint16ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL; 171 char* DFG_OPERATION operationNewUint32ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 172 char* DFG_OPERATION operationNewUint32ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL; 173 char* DFG_OPERATION operationNewFloat32ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 174 char* DFG_OPERATION operationNewFloat32ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL; 175 char* DFG_OPERATION operationNewFloat64ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL; 176 char* DFG_OPERATION operationNewFloat64ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL; 177 EncodedJSValue DFG_OPERATION operationNewRegexp(ExecState*, void*) WTF_INTERNAL; 178 void DFG_OPERATION operationPutByValStrict(ExecState*, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue) WTF_INTERNAL; 179 void DFG_OPERATION operationPutByValNonStrict(ExecState*, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue) WTF_INTERNAL; 180 void DFG_OPERATION operationPutByValCellStrict(ExecState*, JSCell*, EncodedJSValue encodedProperty, EncodedJSValue encodedValue) WTF_INTERNAL; 181 void DFG_OPERATION operationPutByValCellNonStrict(ExecState*, JSCell*, EncodedJSValue encodedProperty, EncodedJSValue encodedValue) WTF_INTERNAL; 182 void DFG_OPERATION operationPutByValBeyondArrayBoundsStrict(ExecState*, JSObject*, int32_t index, EncodedJSValue encodedValue) WTF_INTERNAL; 183 void DFG_OPERATION operationPutByValBeyondArrayBoundsNonStrict(ExecState*, JSObject*, int32_t index, EncodedJSValue encodedValue) WTF_INTERNAL; 184 void DFG_OPERATION operationPutDoubleByValBeyondArrayBoundsStrict(ExecState*, JSObject*, int32_t index, double value) WTF_INTERNAL; 185 void DFG_OPERATION operationPutDoubleByValBeyondArrayBoundsNonStrict(ExecState*, JSObject*, int32_t index, double value) WTF_INTERNAL; 186 EncodedJSValue DFG_OPERATION operationArrayPush(ExecState*, EncodedJSValue encodedValue, JSArray*) WTF_INTERNAL; 187 EncodedJSValue DFG_OPERATION operationArrayPushDouble(ExecState*, double value, JSArray*) WTF_INTERNAL; 188 EncodedJSValue DFG_OPERATION operationArrayPop(ExecState*, JSArray*) WTF_INTERNAL; 189 EncodedJSValue DFG_OPERATION operationArrayPopAndRecoverLength(ExecState*, JSArray*) WTF_INTERNAL; 190 EncodedJSValue DFG_OPERATION operationRegExpExec(ExecState*, JSCell*, JSCell*) WTF_INTERNAL; 191 void DFG_OPERATION operationPutByIdStrict(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL; 192 void DFG_OPERATION operationPutByIdNonStrict(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL; 193 void DFG_OPERATION operationPutByIdDirectStrict(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL; 194 void DFG_OPERATION operationPutByIdDirectNonStrict(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL; 195 void DFG_OPERATION operationPutByIdStrictOptimize(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL; 196 void DFG_OPERATION operationPutByIdNonStrictOptimize(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL; 197 void DFG_OPERATION operationPutByIdDirectStrictOptimize(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL; 198 void DFG_OPERATION operationPutByIdDirectNonStrictOptimize(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL; 199 void DFG_OPERATION operationPutByIdStrictBuildList(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL; 200 void DFG_OPERATION operationPutByIdNonStrictBuildList(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL; 201 void DFG_OPERATION operationPutByIdDirectStrictBuildList(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL; 202 void DFG_OPERATION operationPutByIdDirectNonStrictBuildList(ExecState*, EncodedJSValue encodedValue, JSCell* base, StringImpl*) WTF_INTERNAL; 203 // These comparisons return a boolean within a size_t such that the value is zero extended to fill the register. 204 size_t DFG_OPERATION operationRegExpTest(ExecState*, JSCell*, JSCell*) WTF_INTERNAL; 205 size_t DFG_OPERATION operationCompareLess(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL; 206 size_t DFG_OPERATION operationCompareLessEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL; 207 size_t DFG_OPERATION operationCompareGreater(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL; 208 size_t DFG_OPERATION operationCompareGreaterEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL; 209 size_t DFG_OPERATION operationCompareEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL; 210 #if USE(JSVALUE64) 211 EncodedJSValue DFG_OPERATION operationCompareStringEq(ExecState*, JSCell* left, JSCell* right) WTF_INTERNAL; 212 #else 213 size_t DFG_OPERATION operationCompareStringEq(ExecState*, JSCell* left, JSCell* right) WTF_INTERNAL; 214 #endif 215 size_t DFG_OPERATION operationCompareStrictEqCell(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL; 216 size_t DFG_OPERATION operationCompareStrictEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL; 217 char* DFG_OPERATION operationVirtualCall(ExecState*) WTF_INTERNAL; 218 char* DFG_OPERATION operationLinkCall(ExecState*) WTF_INTERNAL; 219 char* DFG_OPERATION operationLinkClosureCall(ExecState*) WTF_INTERNAL; 220 char* DFG_OPERATION operationVirtualConstruct(ExecState*) WTF_INTERNAL; 221 char* DFG_OPERATION operationLinkConstruct(ExecState*) WTF_INTERNAL; 222 JSCell* DFG_OPERATION operationCreateActivation(ExecState*) WTF_INTERNAL; 223 JSCell* DFG_OPERATION operationCreateArguments(ExecState*) WTF_INTERNAL; 224 JSCell* DFG_OPERATION operationCreateInlinedArguments(ExecState*, InlineCallFrame*) WTF_INTERNAL; 225 void DFG_OPERATION operationTearOffArguments(ExecState*, JSCell*, JSCell*) WTF_INTERNAL; 226 void DFG_OPERATION operationTearOffInlinedArguments(ExecState*, JSCell*, JSCell*, InlineCallFrame*) WTF_INTERNAL; 227 EncodedJSValue DFG_OPERATION operationGetArgumentsLength(ExecState*, int32_t) WTF_INTERNAL; 228 EncodedJSValue DFG_OPERATION operationGetInlinedArgumentByVal(ExecState*, int32_t, InlineCallFrame*, int32_t) WTF_INTERNAL; 229 EncodedJSValue DFG_OPERATION operationGetArgumentByVal(ExecState*, int32_t, int32_t) WTF_INTERNAL; 230 JSCell* DFG_OPERATION operationNewFunctionNoCheck(ExecState*, JSCell*) WTF_INTERNAL; 231 EncodedJSValue DFG_OPERATION operationNewFunction(ExecState*, JSCell*) WTF_INTERNAL; 232 JSCell* DFG_OPERATION operationNewFunctionExpression(ExecState*, JSCell*) WTF_INTERNAL; 233 double DFG_OPERATION operationFModOnInts(int32_t, int32_t) WTF_INTERNAL; 234 size_t DFG_OPERATION operationIsObject(ExecState*, EncodedJSValue) WTF_INTERNAL; 235 size_t DFG_OPERATION operationIsFunction(EncodedJSValue) WTF_INTERNAL; 236 JSCell* DFG_OPERATION operationTypeOf(ExecState*, JSCell*) WTF_INTERNAL; 237 void DFG_OPERATION operationReallocateStorageAndFinishPut(ExecState*, JSObject*, Structure*, PropertyOffset, EncodedJSValue) WTF_INTERNAL; 238 char* DFG_OPERATION operationAllocatePropertyStorageWithInitialCapacity(ExecState*) WTF_INTERNAL; 239 char* DFG_OPERATION operationAllocatePropertyStorage(ExecState*, size_t newSize) WTF_INTERNAL; 240 char* DFG_OPERATION operationReallocateButterflyToHavePropertyStorageWithInitialCapacity(ExecState*, JSObject*) WTF_INTERNAL; 241 char* DFG_OPERATION operationReallocateButterflyToGrowPropertyStorage(ExecState*, JSObject*, size_t newSize) WTF_INTERNAL; 242 char* DFG_OPERATION operationEnsureInt32(ExecState*, JSCell*); 243 char* DFG_OPERATION operationEnsureDouble(ExecState*, JSCell*); 244 char* DFG_OPERATION operationEnsureContiguous(ExecState*, JSCell*); 245 char* DFG_OPERATION operationRageEnsureContiguous(ExecState*, JSCell*); 246 char* DFG_OPERATION operationEnsureArrayStorage(ExecState*, JSCell*); 247 StringImpl* DFG_OPERATION operationResolveRope(ExecState*, JSString*); 248 JSString* DFG_OPERATION operationSingleCharacterString(ExecState*, int32_t); 249 250 JSCell* DFG_OPERATION operationNewStringObject(ExecState*, JSString*, Structure*); 251 JSCell* DFG_OPERATION operationToStringOnCell(ExecState*, JSCell*); 252 JSCell* DFG_OPERATION operationToString(ExecState*, EncodedJSValue); 253 JSCell* DFG_OPERATION operationMakeRope2(ExecState*, JSString*, JSString*); 254 JSCell* DFG_OPERATION operationMakeRope3(ExecState*, JSString*, JSString*, JSString*); 255 char* DFG_OPERATION operationFindSwitchImmTargetForDouble(ExecState*, EncodedJSValue, size_t tableIndex); 256 char* DFG_OPERATION operationSwitchString(ExecState*, size_t tableIndex, JSString*); 103 size_t JIT_OPERATION operationCompareStrictEqCell(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL; 104 size_t JIT_OPERATION operationCompareStrictEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL; 105 JSCell* JIT_OPERATION operationCreateActivation(ExecState*) WTF_INTERNAL; 106 JSCell* JIT_OPERATION operationCreateArguments(ExecState*) WTF_INTERNAL; 107 JSCell* JIT_OPERATION operationCreateInlinedArguments(ExecState*, InlineCallFrame*) WTF_INTERNAL; 108 void JIT_OPERATION operationTearOffArguments(ExecState*, JSCell*, JSCell*) WTF_INTERNAL; 109 void JIT_OPERATION operationTearOffInlinedArguments(ExecState*, JSCell*, JSCell*, InlineCallFrame*) WTF_INTERNAL; 110 EncodedJSValue JIT_OPERATION operationGetArgumentsLength(ExecState*, int32_t) WTF_INTERNAL; 111 EncodedJSValue JIT_OPERATION operationGetInlinedArgumentByVal(ExecState*, int32_t, InlineCallFrame*, int32_t) WTF_INTERNAL; 112 EncodedJSValue JIT_OPERATION operationGetArgumentByVal(ExecState*, int32_t, int32_t) WTF_INTERNAL; 113 JSCell* JIT_OPERATION operationNewFunctionNoCheck(ExecState*, JSCell*) WTF_INTERNAL; 114 EncodedJSValue JIT_OPERATION operationNewFunction(ExecState*, JSCell*) WTF_INTERNAL; 115 JSCell* JIT_OPERATION operationNewFunctionExpression(ExecState*, JSCell*) WTF_INTERNAL; 116 double JIT_OPERATION operationFModOnInts(int32_t, int32_t) WTF_INTERNAL; 117 size_t JIT_OPERATION operationIsObject(ExecState*, EncodedJSValue) WTF_INTERNAL; 118 size_t JIT_OPERATION operationIsFunction(EncodedJSValue) WTF_INTERNAL; 119 JSCell* JIT_OPERATION operationTypeOf(ExecState*, JSCell*) WTF_INTERNAL; 120 char* JIT_OPERATION operationAllocatePropertyStorageWithInitialCapacity(ExecState*) WTF_INTERNAL; 121 char* JIT_OPERATION operationAllocatePropertyStorage(ExecState*, size_t newSize) WTF_INTERNAL; 122 char* JIT_OPERATION operationReallocateButterflyToHavePropertyStorageWithInitialCapacity(ExecState*, JSObject*) WTF_INTERNAL; 123 char* JIT_OPERATION operationReallocateButterflyToGrowPropertyStorage(ExecState*, JSObject*, size_t newSize) WTF_INTERNAL; 124 char* JIT_OPERATION operationEnsureInt32(ExecState*, JSCell*); 125 char* JIT_OPERATION operationEnsureDouble(ExecState*, JSCell*); 126 char* JIT_OPERATION operationEnsureContiguous(ExecState*, JSCell*); 127 char* JIT_OPERATION operationRageEnsureContiguous(ExecState*, JSCell*); 128 char* JIT_OPERATION operationEnsureArrayStorage(ExecState*, JSCell*); 129 StringImpl* JIT_OPERATION operationResolveRope(ExecState*, JSString*); 130 JSString* JIT_OPERATION operationSingleCharacterString(ExecState*, int32_t); 131 132 JSCell* JIT_OPERATION operationNewStringObject(ExecState*, JSString*, Structure*); 133 JSCell* JIT_OPERATION operationToStringOnCell(ExecState*, JSCell*); 134 JSCell* JIT_OPERATION operationToString(ExecState*, EncodedJSValue); 135 JSCell* JIT_OPERATION operationMakeRope2(ExecState*, JSString*, JSString*); 136 JSCell* JIT_OPERATION operationMakeRope3(ExecState*, JSString*, JSString*, JSString*); 137 char* JIT_OPERATION operationFindSwitchImmTargetForDouble(ExecState*, EncodedJSValue, size_t tableIndex); 138 char* JIT_OPERATION operationSwitchString(ExecState*, size_t tableIndex, JSString*); 257 139 258 140 #if ENABLE(FTL_JIT) 259 141 // FIXME: Make calls work well. Currently they're a pure regression. 260 142 // https://bugs.webkit.org/show_bug.cgi?id=113621 261 EncodedJSValue DFG_OPERATION operationFTLCall(ExecState*) WTF_INTERNAL;262 EncodedJSValue DFG_OPERATION operationFTLConstruct(ExecState*) WTF_INTERNAL;143 EncodedJSValue JIT_OPERATION operationFTLCall(ExecState*) WTF_INTERNAL; 144 EncodedJSValue JIT_OPERATION operationFTLConstruct(ExecState*) WTF_INTERNAL; 263 145 #endif // ENABLE(FTL_JIT) 264 265 // This method is used to lookup an exception hander, keyed by faultLocation, which is266 // the return location from one of the calls out to one of the helper operations above.267 268 // According to C++ rules, a type used for the return signature of function with C linkage (i.e.269 // 'extern "C"') needs to be POD; hence putting any constructors into it could cause either compiler270 // warnings, or worse, a change in the ABI used to return these types.271 struct DFGHandler {272 union Union {273 struct Struct {274 ExecState* exec;275 void* handler;276 } s;277 uint64_t encoded;278 } u;279 };280 281 inline DFGHandler createDFGHandler(ExecState* exec, void* handler)282 {283 DFGHandler result;284 result.u.s.exec = exec;285 result.u.s.handler = handler;286 return result;287 }288 289 #if CPU(X86_64)290 typedef DFGHandler DFGHandlerEncoded;291 inline DFGHandlerEncoded dfgHandlerEncoded(ExecState* exec, void* handler)292 {293 return createDFGHandler(exec, handler);294 }295 #else296 typedef uint64_t DFGHandlerEncoded;297 inline DFGHandlerEncoded dfgHandlerEncoded(ExecState* exec, void* handler)298 {299 COMPILE_ASSERT(sizeof(DFGHandler::Union) == sizeof(uint64_t), DFGHandler_Union_is_64bit);300 return createDFGHandler(exec, handler).u.encoded;301 }302 #endif303 DFGHandlerEncoded DFG_OPERATION lookupExceptionHandler(ExecState*) WTF_INTERNAL;304 146 305 147 // These operations implement the implicitly called ToInt32 and ToBoolean conversions from ES5. 306 148 // This conversion returns an int32_t within a size_t such that the value is zero extended to fill the register. 307 size_t DFG_OPERATION dfgConvertJSValueToInt32(ExecState*, EncodedJSValue) WTF_INTERNAL;308 size_t DFG_OPERATION dfgConvertJSValueToBoolean(ExecState*, EncodedJSValue) WTF_INTERNAL;309 310 void DFG_OPERATION debugOperationPrintSpeculationFailure(ExecState*, void*, void*) WTF_INTERNAL;311 312 void DFG_OPERATION triggerReoptimizationNow(CodeBlock*) WTF_INTERNAL;149 size_t JIT_OPERATION dfgConvertJSValueToInt32(ExecState*, EncodedJSValue) WTF_INTERNAL; 150 size_t JIT_OPERATION dfgConvertJSValueToBoolean(ExecState*, EncodedJSValue) WTF_INTERNAL; 151 152 void JIT_OPERATION debugOperationPrintSpeculationFailure(ExecState*, void*, void*) WTF_INTERNAL; 153 154 void JIT_OPERATION triggerReoptimizationNow(CodeBlock*) WTF_INTERNAL; 313 155 314 156 #if ENABLE(FTL_JIT) 315 void DFG_OPERATION triggerTierUpNow(ExecState*) WTF_INTERNAL;316 char* DFG_OPERATION triggerOSREntryNow(ExecState*, int32_t bytecodeIndex, int32_t streamIndex) WTF_INTERNAL;157 void JIT_OPERATION triggerTierUpNow(ExecState*) WTF_INTERNAL; 158 char* JIT_OPERATION triggerOSREntryNow(ExecState*, int32_t bytecodeIndex, int32_t streamIndex) WTF_INTERNAL; 317 159 #endif // ENABLE(FTL_JIT) 318 160 319 161 } // extern "C" 320 162 321 inline P_ DFGOperation_EStZ operationNewTypedArrayWithSizeForType(TypedArrayType type)163 inline P_JITOperation_EStZ operationNewTypedArrayWithSizeForType(TypedArrayType type) 322 164 { 323 165 switch (type) { … … 348 190 } 349 191 350 inline P_ DFGOperation_EStJ operationNewTypedArrayWithOneArgumentForType(TypedArrayType type)192 inline P_JITOperation_EStJ operationNewTypedArrayWithOneArgumentForType(TypedArrayType type) 351 193 { 352 194 switch (type) { -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp
r156482 r156490 896 896 } 897 897 898 void SpeculativeJIT::writeBarrier(MacroAssembler& jit, GPRReg owner, GPRReg scratch1, GPRReg scratch2, WriteBarrierUseKind useKind)899 {900 UNUSED_PARAM(jit);901 UNUSED_PARAM(owner);902 UNUSED_PARAM(scratch1);903 UNUSED_PARAM(scratch2);904 UNUSED_PARAM(useKind);905 ASSERT(owner != scratch1);906 ASSERT(owner != scratch2);907 ASSERT(scratch1 != scratch2);908 909 #if ENABLE(WRITE_BARRIER_PROFILING)910 JITCompiler::emitCount(jit, WriteBarrierCounters::jitCounterFor(useKind));911 #endif912 }913 914 898 void SpeculativeJIT::writeBarrier(GPRReg ownerGPR, GPRReg valueGPR, Edge valueUse, WriteBarrierUseKind useKind, GPRReg scratch1, GPRReg scratch2) 915 899 { … … 1018 1002 } 1019 1003 1020 bool SpeculativeJIT::nonSpeculativeCompare(Node* node, MacroAssembler::RelationalCondition cond, S_ DFGOperation_EJJ helperFunction)1004 bool SpeculativeJIT::nonSpeculativeCompare(Node* node, MacroAssembler::RelationalCondition cond, S_JITOperation_EJJ helperFunction) 1021 1005 { 1022 1006 unsigned branchIndexInBlock = detectPeepHoleBranch(); … … 1466 1450 1467 1451 // Returns true if the compare is fused with a subsequent branch. 1468 bool SpeculativeJIT::compilePeepHoleBranch(Node* node, MacroAssembler::RelationalCondition condition, MacroAssembler::DoubleCondition doubleCondition, S_ DFGOperation_EJJ operation)1452 bool SpeculativeJIT::compilePeepHoleBranch(Node* node, MacroAssembler::RelationalCondition condition, MacroAssembler::DoubleCondition doubleCondition, S_JITOperation_EJJ operation) 1469 1453 { 1470 1454 // Fused compare & branch. … … 3843 3827 3844 3828 // Returns true if the compare is fused with a subsequent branch. 3845 bool SpeculativeJIT::compare(Node* node, MacroAssembler::RelationalCondition condition, MacroAssembler::DoubleCondition doubleCondition, S_ DFGOperation_EJJ operation)3829 bool SpeculativeJIT::compare(Node* node, MacroAssembler::RelationalCondition condition, MacroAssembler::DoubleCondition doubleCondition, S_JITOperation_EJJ operation) 3846 3830 { 3847 3831 if (compilePeepHoleBranch(node, condition, doubleCondition, operation)) -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h
r156482 r156490 37 37 #include "DFGOSRExit.h" 38 38 #include "DFGOSRExitJumpPlaceholder.h" 39 #include "DFGOperations.h"40 39 #include "DFGSilentRegisterSavePlan.h" 41 40 #include "DFGValueSource.h" 41 #include "JITOperations.h" 42 42 #include "MarkedAllocator.h" 43 #include "PutKind.h" 43 44 #include "ValueRecovery.h" 44 45 … … 312 313 } 313 314 314 static void writeBarrier(MacroAssembler&, GPRReg ownerGPR, GPRReg scratchGPR1, GPRReg scratchGPR2, WriteBarrierUseKind);315 316 315 void writeBarrier(GPRReg ownerGPR, GPRReg valueGPR, Edge valueUse, WriteBarrierUseKind, GPRReg scratchGPR1 = InvalidGPRReg, GPRReg scratchGPR2 = InvalidGPRReg); 317 316 void writeBarrier(GPRReg ownerGPR, JSCell* value, WriteBarrierUseKind, GPRReg scratchGPR1 = InvalidGPRReg, GPRReg scratchGPR2 = InvalidGPRReg); … … 740 739 bool nonSpeculativeCompareNull(Node*, Edge operand, bool invert = false); 741 740 742 void nonSpeculativePeepholeBranch(Node*, Node* branchNode, MacroAssembler::RelationalCondition, S_ DFGOperation_EJJ helperFunction);743 void nonSpeculativeNonPeepholeCompare(Node*, MacroAssembler::RelationalCondition, S_ DFGOperation_EJJ helperFunction);744 bool nonSpeculativeCompare(Node*, MacroAssembler::RelationalCondition, S_ DFGOperation_EJJ helperFunction);741 void nonSpeculativePeepholeBranch(Node*, Node* branchNode, MacroAssembler::RelationalCondition, S_JITOperation_EJJ helperFunction); 742 void nonSpeculativeNonPeepholeCompare(Node*, MacroAssembler::RelationalCondition, S_JITOperation_EJJ helperFunction); 743 bool nonSpeculativeCompare(Node*, MacroAssembler::RelationalCondition, S_JITOperation_EJJ helperFunction); 745 744 746 745 void nonSpeculativePeepholeStrictEq(Node*, Node* branchNode, bool invert = false); … … 932 931 // decision as to how to fill the regsiters to setupArguments* methods. 933 932 934 JITCompiler::Call callOperation(P_ DFGOperation_E operation, GPRReg result)933 JITCompiler::Call callOperation(P_JITOperation_E operation, GPRReg result) 935 934 { 936 935 m_jit.setupArgumentsExecState(); 937 936 return appendCallWithExceptionCheckSetResult(operation, result); 938 937 } 939 JITCompiler::Call callOperation(P_ DFGOperation_EC operation, GPRReg result, GPRReg cell)938 JITCompiler::Call callOperation(P_JITOperation_EC operation, GPRReg result, GPRReg cell) 940 939 { 941 940 m_jit.setupArgumentsWithExecState(cell); 942 941 return appendCallWithExceptionCheckSetResult(operation, result); 943 942 } 944 JITCompiler::Call callOperation(P_ DFGOperation_EO operation, GPRReg result, GPRReg object)943 JITCompiler::Call callOperation(P_JITOperation_EO operation, GPRReg result, GPRReg object) 945 944 { 946 945 m_jit.setupArgumentsWithExecState(object); 947 946 return appendCallWithExceptionCheckSetResult(operation, result); 948 947 } 949 JITCompiler::Call callOperation(P_ DFGOperation_EOS operation, GPRReg result, GPRReg object, size_t size)948 JITCompiler::Call callOperation(P_JITOperation_EOS operation, GPRReg result, GPRReg object, size_t size) 950 949 { 951 950 m_jit.setupArgumentsWithExecState(object, TrustedImmPtr(size)); 952 951 return appendCallWithExceptionCheckSetResult(operation, result); 953 952 } 954 JITCompiler::Call callOperation(P_ DFGOperation_EOZ operation, GPRReg result, GPRReg object, int32_t size)953 JITCompiler::Call callOperation(P_JITOperation_EOZ operation, GPRReg result, GPRReg object, int32_t size) 955 954 { 956 955 m_jit.setupArgumentsWithExecState(object, TrustedImmPtr(size)); 957 956 return appendCallWithExceptionCheckSetResult(operation, result); 958 957 } 959 JITCompiler::Call callOperation(C_ DFGOperation_EOZ operation, GPRReg result, GPRReg object, int32_t size)958 JITCompiler::Call callOperation(C_JITOperation_EOZ operation, GPRReg result, GPRReg object, int32_t size) 960 959 { 961 960 m_jit.setupArgumentsWithExecState(object, TrustedImmPtr(static_cast<size_t>(size))); 962 961 return appendCallWithExceptionCheckSetResult(operation, result); 963 962 } 964 JITCompiler::Call callOperation(P_ DFGOperation_EPS operation, GPRReg result, GPRReg old, size_t size)963 JITCompiler::Call callOperation(P_JITOperation_EPS operation, GPRReg result, GPRReg old, size_t size) 965 964 { 966 965 m_jit.setupArgumentsWithExecState(old, TrustedImmPtr(size)); 967 966 return appendCallWithExceptionCheckSetResult(operation, result); 968 967 } 969 JITCompiler::Call callOperation(P_ DFGOperation_ES operation, GPRReg result, size_t size)968 JITCompiler::Call callOperation(P_JITOperation_ES operation, GPRReg result, size_t size) 970 969 { 971 970 m_jit.setupArgumentsWithExecState(TrustedImmPtr(size)); 972 971 return appendCallWithExceptionCheckSetResult(operation, result); 973 972 } 974 JITCompiler::Call callOperation(P_ DFGOperation_ESJss operation, GPRReg result, size_t index, GPRReg arg1)973 JITCompiler::Call callOperation(P_JITOperation_ESJss operation, GPRReg result, size_t index, GPRReg arg1) 975 974 { 976 975 m_jit.setupArgumentsWithExecState(TrustedImmPtr(index), arg1); 977 976 return appendCallWithExceptionCheckSetResult(operation, result); 978 977 } 979 JITCompiler::Call callOperation(P_ DFGOperation_ESt operation, GPRReg result, Structure* structure)978 JITCompiler::Call callOperation(P_JITOperation_ESt operation, GPRReg result, Structure* structure) 980 979 { 981 980 m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure)); 982 981 return appendCallWithExceptionCheckSetResult(operation, result); 983 982 } 984 JITCompiler::Call callOperation(P_ DFGOperation_EStZ operation, GPRReg result, Structure* structure, GPRReg arg2)983 JITCompiler::Call callOperation(P_JITOperation_EStZ operation, GPRReg result, Structure* structure, GPRReg arg2) 985 984 { 986 985 m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), arg2); 987 986 return appendCallWithExceptionCheckSetResult(operation, result); 988 987 } 989 JITCompiler::Call callOperation(P_ DFGOperation_EStZ operation, GPRReg result, Structure* structure, size_t arg2)988 JITCompiler::Call callOperation(P_JITOperation_EStZ operation, GPRReg result, Structure* structure, size_t arg2) 990 989 { 991 990 m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), TrustedImm32(arg2)); 992 991 return appendCallWithExceptionCheckSetResult(operation, result); 993 992 } 994 JITCompiler::Call callOperation(P_ DFGOperation_EStZ operation, GPRReg result, GPRReg arg1, GPRReg arg2)993 JITCompiler::Call callOperation(P_JITOperation_EStZ operation, GPRReg result, GPRReg arg1, GPRReg arg2) 995 994 { 996 995 m_jit.setupArgumentsWithExecState(arg1, arg2); 997 996 return appendCallWithExceptionCheckSetResult(operation, result); 998 997 } 999 JITCompiler::Call callOperation(P_ DFGOperation_EStPS operation, GPRReg result, Structure* structure, void* pointer, size_t size)998 JITCompiler::Call callOperation(P_JITOperation_EStPS operation, GPRReg result, Structure* structure, void* pointer, size_t size) 1000 999 { 1001 1000 m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), TrustedImmPtr(pointer), TrustedImmPtr(size)); 1002 1001 return appendCallWithExceptionCheckSetResult(operation, result); 1003 1002 } 1004 JITCompiler::Call callOperation(P_ DFGOperation_EStSS operation, GPRReg result, Structure* structure, size_t index, size_t size)1003 JITCompiler::Call callOperation(P_JITOperation_EStSS operation, GPRReg result, Structure* structure, size_t index, size_t size) 1005 1004 { 1006 1005 m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), TrustedImmPtr(index), TrustedImmPtr(size)); 1007 1006 return appendCallWithExceptionCheckSetResult(operation, result); 1008 1007 } 1009 JITCompiler::Call callOperation(C_ DFGOperation_E operation, GPRReg result)1008 JITCompiler::Call callOperation(C_JITOperation_E operation, GPRReg result) 1010 1009 { 1011 1010 m_jit.setupArgumentsExecState(); 1012 1011 return appendCallWithExceptionCheckSetResult(operation, result); 1013 1012 } 1014 JITCompiler::Call callOperation(C_ DFGOperation_EC operation, GPRReg result, GPRReg arg1)1013 JITCompiler::Call callOperation(C_JITOperation_EC operation, GPRReg result, GPRReg arg1) 1015 1014 { 1016 1015 m_jit.setupArgumentsWithExecState(arg1); 1017 1016 return appendCallWithExceptionCheckSetResult(operation, result); 1018 1017 } 1019 JITCompiler::Call callOperation(C_ DFGOperation_EC operation, GPRReg result, JSCell* cell)1018 JITCompiler::Call callOperation(C_JITOperation_EC operation, GPRReg result, JSCell* cell) 1020 1019 { 1021 1020 m_jit.setupArgumentsWithExecState(TrustedImmPtr(cell)); 1022 1021 return appendCallWithExceptionCheckSetResult(operation, result); 1023 1022 } 1024 JITCompiler::Call callOperation(C_ DFGOperation_ECC operation, GPRReg result, GPRReg arg1, JSCell* cell)1023 JITCompiler::Call callOperation(C_JITOperation_ECC operation, GPRReg result, GPRReg arg1, JSCell* cell) 1025 1024 { 1026 1025 m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(cell)); 1027 1026 return appendCallWithExceptionCheckSetResult(operation, result); 1028 1027 } 1029 JITCompiler::Call callOperation(C_ DFGOperation_EIcf operation, GPRReg result, InlineCallFrame* inlineCallFrame)1028 JITCompiler::Call callOperation(C_JITOperation_EIcf operation, GPRReg result, InlineCallFrame* inlineCallFrame) 1030 1029 { 1031 1030 m_jit.setupArgumentsWithExecState(TrustedImmPtr(inlineCallFrame)); 1032 1031 return appendCallWithExceptionCheckSetResult(operation, result); 1033 1032 } 1034 JITCompiler::Call callOperation(C_ DFGOperation_ESt operation, GPRReg result, Structure* structure)1033 JITCompiler::Call callOperation(C_JITOperation_ESt operation, GPRReg result, Structure* structure) 1035 1034 { 1036 1035 m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure)); 1037 1036 return appendCallWithExceptionCheckSetResult(operation, result); 1038 1037 } 1039 JITCompiler::Call callOperation(C_ DFGOperation_EJssSt operation, GPRReg result, GPRReg arg1, Structure* structure)1038 JITCompiler::Call callOperation(C_JITOperation_EJssSt operation, GPRReg result, GPRReg arg1, Structure* structure) 1040 1039 { 1041 1040 m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(structure)); 1042 1041 return appendCallWithExceptionCheckSetResult(operation, result); 1043 1042 } 1044 JITCompiler::Call callOperation(C_ DFGOperation_EJssJss operation, GPRReg result, GPRReg arg1, GPRReg arg2)1043 JITCompiler::Call callOperation(C_JITOperation_EJssJss operation, GPRReg result, GPRReg arg1, GPRReg arg2) 1045 1044 { 1046 1045 m_jit.setupArgumentsWithExecState(arg1, arg2); 1047 1046 return appendCallWithExceptionCheckSetResult(operation, result); 1048 1047 } 1049 JITCompiler::Call callOperation(C_ DFGOperation_EJssJssJss operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3)1048 JITCompiler::Call callOperation(C_JITOperation_EJssJssJss operation, GPRReg result, GPRReg arg1, GPRReg arg2, GPRReg arg3) 1050 1049 { 1051 1050 m_jit.setupArgumentsWithExecState(arg1, arg2, arg3); … … 1053 1052 } 1054 1053 1055 JITCompiler::Call callOperation(S_ DFGOperation_ECC operation, GPRReg result, GPRReg arg1, GPRReg arg2)1054 JITCompiler::Call callOperation(S_JITOperation_ECC operation, GPRReg result, GPRReg arg1, GPRReg arg2) 1056 1055 { 1057 1056 m_jit.setupArgumentsWithExecState(arg1, arg2); … … 1059 1058 } 1060 1059 1061 JITCompiler::Call callOperation(Jss_ DFGOperation_EZ operation, GPRReg result, GPRReg arg1)1060 JITCompiler::Call callOperation(Jss_JITOperation_EZ operation, GPRReg result, GPRReg arg1) 1062 1061 { 1063 1062 m_jit.setupArgumentsWithExecState(arg1); … … 1065 1064 } 1066 1065 1067 JITCompiler::Call callOperation(V_ DFGOperation_EC operation, GPRReg arg1)1066 JITCompiler::Call callOperation(V_JITOperation_EC operation, GPRReg arg1) 1068 1067 { 1069 1068 m_jit.setupArgumentsWithExecState(arg1); … … 1071 1070 } 1072 1071 1073 JITCompiler::Call callOperation(V_ DFGOperation_ECIcf operation, GPRReg arg1, InlineCallFrame* inlineCallFrame)1072 JITCompiler::Call callOperation(V_JITOperation_ECIcf operation, GPRReg arg1, InlineCallFrame* inlineCallFrame) 1074 1073 { 1075 1074 m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(inlineCallFrame)); 1076 1075 return appendCallWithExceptionCheck(operation); 1077 1076 } 1078 JITCompiler::Call callOperation(V_ DFGOperation_ECCIcf operation, GPRReg arg1, GPRReg arg2, InlineCallFrame* inlineCallFrame)1077 JITCompiler::Call callOperation(V_JITOperation_ECCIcf operation, GPRReg arg1, GPRReg arg2, InlineCallFrame* inlineCallFrame) 1079 1078 { 1080 1079 m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(inlineCallFrame)); … … 1082 1081 } 1083 1082 1084 JITCompiler::Call callOperation(V_ DFGOperation_ECZ operation, GPRReg arg1, int arg2)1083 JITCompiler::Call callOperation(V_JITOperation_ECZ operation, GPRReg arg1, int arg2) 1085 1084 { 1086 1085 m_jit.setupArgumentsWithExecState(arg1, TrustedImm32(arg2)); … … 1088 1087 } 1089 1088 1090 JITCompiler::Call callOperation(V_ DFGOperation_ECC operation, GPRReg arg1, GPRReg arg2)1089 JITCompiler::Call callOperation(V_JITOperation_ECC operation, GPRReg arg1, GPRReg arg2) 1091 1090 { 1092 1091 m_jit.setupArgumentsWithExecState(arg1, arg2); … … 1094 1093 } 1095 1094 1096 JITCompiler::Call callOperation(V_ DFGOperation_W operation, WatchpointSet* watchpointSet)1095 JITCompiler::Call callOperation(V_JITOperation_W operation, WatchpointSet* watchpointSet) 1097 1096 { 1098 1097 m_jit.setupArguments(TrustedImmPtr(watchpointSet)); … … 1126 1125 } 1127 1126 1128 JITCompiler::Call callOperation(D_ DFGOperation_ZZ operation, FPRReg result, GPRReg arg1, GPRReg arg2)1127 JITCompiler::Call callOperation(D_JITOperation_ZZ operation, FPRReg result, GPRReg arg1, GPRReg arg2) 1129 1128 { 1130 1129 m_jit.setupArguments(arg1, arg2); 1131 1130 return appendCallSetResult(operation, result); 1132 1131 } 1133 JITCompiler::Call callOperation(D_ DFGOperation_DD operation, FPRReg result, FPRReg arg1, FPRReg arg2)1132 JITCompiler::Call callOperation(D_JITOperation_DD operation, FPRReg result, FPRReg arg1, FPRReg arg2) 1134 1133 { 1135 1134 m_jit.setupArguments(arg1, arg2); 1136 1135 return appendCallSetResult(operation, result); 1137 1136 } 1138 JITCompiler::Call callOperation(I_ DFGOperation_EJss operation, GPRReg result, GPRReg arg1)1137 JITCompiler::Call callOperation(I_JITOperation_EJss operation, GPRReg result, GPRReg arg1) 1139 1138 { 1140 1139 m_jit.setupArgumentsWithExecState(arg1); 1141 1140 return appendCallWithExceptionCheckSetResult(operation, result); 1142 1141 } 1143 JITCompiler::Call callOperation(C_ DFGOperation_EZ operation, GPRReg result, GPRReg arg1)1142 JITCompiler::Call callOperation(C_JITOperation_EZ operation, GPRReg result, GPRReg arg1) 1144 1143 { 1145 1144 m_jit.setupArgumentsWithExecState(arg1); … … 1148 1147 1149 1148 #if USE(JSVALUE64) 1150 JITCompiler::Call callOperation(J_ DFGOperation_E operation, GPRReg result)1149 JITCompiler::Call callOperation(J_JITOperation_E operation, GPRReg result) 1151 1150 { 1152 1151 m_jit.setupArgumentsExecState(); 1153 1152 return appendCallWithExceptionCheckSetResult(operation, result); 1154 1153 } 1155 JITCompiler::Call callOperation(J_ DFGOperation_EP operation, GPRReg result, void* pointer)1154 JITCompiler::Call callOperation(J_JITOperation_EP operation, GPRReg result, void* pointer) 1156 1155 { 1157 1156 m_jit.setupArgumentsWithExecState(TrustedImmPtr(pointer)); 1158 1157 return appendCallWithExceptionCheckSetResult(operation, result); 1159 1158 } 1160 JITCompiler::Call callOperation(Z_ DFGOperation_D operation, GPRReg result, FPRReg arg1)1159 JITCompiler::Call callOperation(Z_JITOperation_D operation, GPRReg result, FPRReg arg1) 1161 1160 { 1162 1161 m_jit.setupArguments(arg1); … … 1165 1164 return call; 1166 1165 } 1167 JITCompiler::Call callOperation(J_ DFGOperation_EI operation, GPRReg result, StringImpl* uid)1166 JITCompiler::Call callOperation(J_JITOperation_EI operation, GPRReg result, StringImpl* uid) 1168 1167 { 1169 1168 m_jit.setupArgumentsWithExecState(TrustedImmPtr(uid)); 1170 1169 return appendCallWithExceptionCheckSetResult(operation, result); 1171 1170 } 1172 JITCompiler::Call callOperation(J_ DFGOperation_EA operation, GPRReg result, GPRReg arg1)1171 JITCompiler::Call callOperation(J_JITOperation_EA operation, GPRReg result, GPRReg arg1) 1173 1172 { 1174 1173 m_jit.setupArgumentsWithExecState(arg1); 1175 1174 return appendCallWithExceptionCheckSetResult(operation, result); 1176 1175 } 1177 JITCompiler::Call callOperation(J_ DFGOperation_EAZ operation, GPRReg result, GPRReg arg1, GPRReg arg2)1176 JITCompiler::Call callOperation(J_JITOperation_EAZ operation, GPRReg result, GPRReg arg1, GPRReg arg2) 1178 1177 { 1179 1178 m_jit.setupArgumentsWithExecState(arg1, arg2); 1180 1179 return appendCallWithExceptionCheckSetResult(operation, result); 1181 1180 } 1182 JITCompiler::Call callOperation(J_ DFGOperation_EJssZ operation, GPRReg result, GPRReg arg1, GPRReg arg2)1181 JITCompiler::Call callOperation(J_JITOperation_EJssZ operation, GPRReg result, GPRReg arg1, GPRReg arg2) 1183 1182 { 1184 1183 m_jit.setupArgumentsWithExecState(arg1, arg2); 1185 1184 return appendCallWithExceptionCheckSetResult(operation, result); 1186 1185 } 1187 JITCompiler::Call callOperation(J_ DFGOperation_EPS operation, GPRReg result, void* pointer, size_t size)1186 JITCompiler::Call callOperation(J_JITOperation_EPS operation, GPRReg result, void* pointer, size_t size) 1188 1187 { 1189 1188 m_jit.setupArgumentsWithExecState(TrustedImmPtr(pointer), TrustedImmPtr(size)); 1190 1189 return appendCallWithExceptionCheckSetResult(operation, result); 1191 1190 } 1192 JITCompiler::Call callOperation(J_ DFGOperation_ESS operation, GPRReg result, int startConstant, int numConstants)1191 JITCompiler::Call callOperation(J_JITOperation_ESS operation, GPRReg result, int startConstant, int numConstants) 1193 1192 { 1194 1193 m_jit.setupArgumentsWithExecState(TrustedImm32(startConstant), TrustedImm32(numConstants)); 1195 1194 return appendCallWithExceptionCheckSetResult(operation, result); 1196 1195 } 1197 JITCompiler::Call callOperation(J_ DFGOperation_EPP operation, GPRReg result, GPRReg arg1, void* pointer)1196 JITCompiler::Call callOperation(J_JITOperation_EPP operation, GPRReg result, GPRReg arg1, void* pointer) 1198 1197 { 1199 1198 m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(pointer)); 1200 1199 return appendCallWithExceptionCheckSetResult(operation, result); 1201 1200 } 1202 JITCompiler::Call callOperation(J_ DFGOperation_EC operation, GPRReg result, JSCell* cell)1201 JITCompiler::Call callOperation(J_JITOperation_EC operation, GPRReg result, JSCell* cell) 1203 1202 { 1204 1203 m_jit.setupArgumentsWithExecState(TrustedImmPtr(cell)); 1205 1204 return appendCallWithExceptionCheckSetResult(operation, result); 1206 1205 } 1207 JITCompiler::Call callOperation(J_ DFGOperation_ECI operation, GPRReg result, GPRReg arg1, const StringImpl* uid)1206 JITCompiler::Call callOperation(J_JITOperation_ECI operation, GPRReg result, GPRReg arg1, const StringImpl* uid) 1208 1207 { 1209 1208 m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(uid)); 1210 1209 return appendCallWithExceptionCheckSetResult(operation, result); 1211 1210 } 1212 JITCompiler::Call callOperation(J_ DFGOperation_EJI operation, GPRReg result, GPRReg arg1, StringImpl* uid)1211 JITCompiler::Call callOperation(J_JITOperation_EJI operation, GPRReg result, GPRReg arg1, StringImpl* uid) 1213 1212 { 1214 1213 m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(uid)); 1215 1214 return appendCallWithExceptionCheckSetResult(operation, result); 1216 1215 } 1217 JITCompiler::Call callOperation(J_ DFGOperation_EDA operation, GPRReg result, FPRReg arg1, GPRReg arg2)1216 JITCompiler::Call callOperation(J_JITOperation_EDA operation, GPRReg result, FPRReg arg1, GPRReg arg2) 1218 1217 { 1219 1218 m_jit.setupArgumentsWithExecState(arg1, arg2); 1220 1219 return appendCallWithExceptionCheckSetResult(operation, result); 1221 1220 } 1222 JITCompiler::Call callOperation(J_ DFGOperation_EJA operation, GPRReg result, GPRReg arg1, GPRReg arg2)1221 JITCompiler::Call callOperation(J_JITOperation_EJA operation, GPRReg result, GPRReg arg1, GPRReg arg2) 1223 1222 { 1224 1223 m_jit.setupArgumentsWithExecState(arg1, arg2); 1225 1224 return appendCallWithExceptionCheckSetResult(operation, result); 1226 1225 } 1227 JITCompiler::Call callOperation(J_ DFGOperation_EP operation, GPRReg result, GPRReg arg1)1226 JITCompiler::Call callOperation(J_JITOperation_EP operation, GPRReg result, GPRReg arg1) 1228 1227 { 1229 1228 m_jit.setupArgumentsWithExecState(arg1); 1230 1229 return appendCallWithExceptionCheckSetResult(operation, result); 1231 1230 } 1232 JITCompiler::Call callOperation(J_ DFGOperation_EZ operation, GPRReg result, GPRReg arg1)1231 JITCompiler::Call callOperation(J_JITOperation_EZ operation, GPRReg result, GPRReg arg1) 1233 1232 { 1234 1233 m_jit.setupArgumentsWithExecState(arg1); 1235 1234 return appendCallWithExceptionCheckSetResult(operation, result); 1236 1235 } 1237 JITCompiler::Call callOperation(J_ DFGOperation_EZ operation, GPRReg result, int32_t arg1)1236 JITCompiler::Call callOperation(J_JITOperation_EZ operation, GPRReg result, int32_t arg1) 1238 1237 { 1239 1238 m_jit.setupArgumentsWithExecState(TrustedImm32(arg1)); 1240 1239 return appendCallWithExceptionCheckSetResult(operation, result); 1241 1240 } 1242 JITCompiler::Call callOperation(J_ DFGOperation_EZZ operation, GPRReg result, int32_t arg1, GPRReg arg2)1241 JITCompiler::Call callOperation(J_JITOperation_EZZ operation, GPRReg result, int32_t arg1, GPRReg arg2) 1243 1242 { 1244 1243 m_jit.setupArgumentsWithExecState(TrustedImm32(arg1), arg2); 1245 1244 return appendCallWithExceptionCheckSetResult(operation, result); 1246 1245 } 1247 JITCompiler::Call callOperation(J_ DFGOperation_EZIcfZ operation, GPRReg result, int32_t arg1, InlineCallFrame* inlineCallFrame, GPRReg arg2)1246 JITCompiler::Call callOperation(J_JITOperation_EZIcfZ operation, GPRReg result, int32_t arg1, InlineCallFrame* inlineCallFrame, GPRReg arg2) 1248 1247 { 1249 1248 m_jit.setupArgumentsWithExecState(TrustedImm32(arg1), TrustedImmPtr(inlineCallFrame), arg2); … … 1251 1250 } 1252 1251 1253 JITCompiler::Call callOperation(P_ DFGOperation_EJS operation, GPRReg result, GPRReg value, size_t index)1252 JITCompiler::Call callOperation(P_JITOperation_EJS operation, GPRReg result, GPRReg value, size_t index) 1254 1253 { 1255 1254 m_jit.setupArgumentsWithExecState(value, TrustedImmPtr(index)); … … 1257 1256 } 1258 1257 1259 JITCompiler::Call callOperation(P_ DFGOperation_EStJ operation, GPRReg result, Structure* structure, GPRReg arg2)1258 JITCompiler::Call callOperation(P_JITOperation_EStJ operation, GPRReg result, Structure* structure, GPRReg arg2) 1260 1259 { 1261 1260 m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), arg2); … … 1263 1262 } 1264 1263 1265 JITCompiler::Call callOperation(C_ DFGOperation_EJ operation, GPRReg result, GPRReg arg1)1264 JITCompiler::Call callOperation(C_JITOperation_EJ operation, GPRReg result, GPRReg arg1) 1266 1265 { 1267 1266 m_jit.setupArgumentsWithExecState(arg1); 1268 1267 return appendCallWithExceptionCheckSetResult(operation, result); 1269 1268 } 1270 JITCompiler::Call callOperation(S_ DFGOperation_J operation, GPRReg result, GPRReg arg1)1269 JITCompiler::Call callOperation(S_JITOperation_J operation, GPRReg result, GPRReg arg1) 1271 1270 { 1272 1271 m_jit.setupArguments(arg1); 1273 1272 return appendCallSetResult(operation, result); 1274 1273 } 1275 JITCompiler::Call callOperation(S_ DFGOperation_EJ operation, GPRReg result, GPRReg arg1)1274 JITCompiler::Call callOperation(S_JITOperation_EJ operation, GPRReg result, GPRReg arg1) 1276 1275 { 1277 1276 m_jit.setupArgumentsWithExecState(arg1); 1278 1277 return appendCallWithExceptionCheckSetResult(operation, result); 1279 1278 } 1280 JITCompiler::Call callOperation(J_ DFGOperation_EJ operation, GPRReg result, GPRReg arg1)1279 JITCompiler::Call callOperation(J_JITOperation_EJ operation, GPRReg result, GPRReg arg1) 1281 1280 { 1282 1281 m_jit.setupArgumentsWithExecState(arg1); 1283 1282 return appendCallWithExceptionCheckSetResult(operation, result); 1284 1283 } 1285 JITCompiler::Call callOperation(S_ DFGOperation_EJJ operation, GPRReg result, GPRReg arg1, GPRReg arg2)1284 JITCompiler::Call callOperation(S_JITOperation_EJJ operation, GPRReg result, GPRReg arg1, GPRReg arg2) 1286 1285 { 1287 1286 m_jit.setupArgumentsWithExecState(arg1, arg2); … … 1289 1288 } 1290 1289 1291 JITCompiler::Call callOperation(J_ DFGOperation_EPP operation, GPRReg result, GPRReg arg1, GPRReg arg2)1290 JITCompiler::Call callOperation(J_JITOperation_EPP operation, GPRReg result, GPRReg arg1, GPRReg arg2) 1292 1291 { 1293 1292 m_jit.setupArgumentsWithExecState(arg1, arg2); 1294 1293 return appendCallWithExceptionCheckSetResult(operation, result); 1295 1294 } 1296 JITCompiler::Call callOperation(J_ DFGOperation_EJJ operation, GPRReg result, GPRReg arg1, GPRReg arg2)1295 JITCompiler::Call callOperation(J_JITOperation_EJJ operation, GPRReg result, GPRReg arg1, GPRReg arg2) 1297 1296 { 1298 1297 m_jit.setupArgumentsWithExecState(arg1, arg2); 1299 1298 return appendCallWithExceptionCheckSetResult(operation, result); 1300 1299 } 1301 JITCompiler::Call callOperation(J_ DFGOperation_EJJ operation, GPRReg result, GPRReg arg1, MacroAssembler::TrustedImm32 imm)1300 JITCompiler::Call callOperation(J_JITOperation_EJJ operation, GPRReg result, GPRReg arg1, MacroAssembler::TrustedImm32 imm) 1302 1301 { 1303 1302 m_jit.setupArgumentsWithExecState(arg1, MacroAssembler::TrustedImm64(JSValue::encode(jsNumber(imm.m_value)))); 1304 1303 return appendCallWithExceptionCheckSetResult(operation, result); 1305 1304 } 1306 JITCompiler::Call callOperation(J_ DFGOperation_EJJ operation, GPRReg result, MacroAssembler::TrustedImm32 imm, GPRReg arg2)1305 JITCompiler::Call callOperation(J_JITOperation_EJJ operation, GPRReg result, MacroAssembler::TrustedImm32 imm, GPRReg arg2) 1307 1306 { 1308 1307 m_jit.setupArgumentsWithExecState(MacroAssembler::TrustedImm64(JSValue::encode(jsNumber(imm.m_value))), arg2); 1309 1308 return appendCallWithExceptionCheckSetResult(operation, result); 1310 1309 } 1311 JITCompiler::Call callOperation(J_ DFGOperation_ECC operation, GPRReg result, GPRReg arg1, GPRReg arg2)1310 JITCompiler::Call callOperation(J_JITOperation_ECC operation, GPRReg result, GPRReg arg1, GPRReg arg2) 1312 1311 { 1313 1312 m_jit.setupArgumentsWithExecState(arg1, arg2); 1314 1313 return appendCallWithExceptionCheckSetResult(operation, result); 1315 1314 } 1316 JITCompiler::Call callOperation(J_ DFGOperation_ECJ operation, GPRReg result, GPRReg arg1, GPRReg arg2)1315 JITCompiler::Call callOperation(J_JITOperation_ECJ operation, GPRReg result, GPRReg arg1, GPRReg arg2) 1317 1316 { 1318 1317 m_jit.setupArgumentsWithExecState(arg1, arg2); 1319 1318 return appendCallWithExceptionCheckSetResult(operation, result); 1320 1319 } 1321 JITCompiler::Call callOperation(J_ DFGOperation_ECJ operation, GPRReg result, GPRReg arg1, JSValueRegs arg2)1320 JITCompiler::Call callOperation(J_JITOperation_ECJ operation, GPRReg result, GPRReg arg1, JSValueRegs arg2) 1322 1321 { 1323 1322 m_jit.setupArgumentsWithExecState(arg1, arg2.gpr()); … … 1325 1324 } 1326 1325 1327 JITCompiler::Call callOperation(V_ DFGOperation_EOZD operation, GPRReg arg1, GPRReg arg2, FPRReg arg3)1326 JITCompiler::Call callOperation(V_JITOperation_EOZD operation, GPRReg arg1, GPRReg arg2, FPRReg arg3) 1328 1327 { 1329 1328 m_jit.setupArgumentsWithExecState(arg1, arg2, arg3); … … 1331 1330 } 1332 1331 1333 JITCompiler::Call callOperation(V_ DFGOperation_EJPP operation, GPRReg arg1, GPRReg arg2, void* pointer)1332 JITCompiler::Call callOperation(V_JITOperation_EJPP operation, GPRReg arg1, GPRReg arg2, void* pointer) 1334 1333 { 1335 1334 m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(pointer)); 1336 1335 return appendCallWithExceptionCheck(operation); 1337 1336 } 1338 JITCompiler::Call callOperation(V_ DFGOperation_EJCI operation, GPRReg arg1, GPRReg arg2, StringImpl* uid)1337 JITCompiler::Call callOperation(V_JITOperation_EJCI operation, GPRReg arg1, GPRReg arg2, StringImpl* uid) 1339 1338 { 1340 1339 m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(uid)); 1341 1340 return appendCallWithExceptionCheck(operation); 1342 1341 } 1343 JITCompiler::Call callOperation(V_ DFGOperation_EJJJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3)1342 JITCompiler::Call callOperation(V_JITOperation_EJJJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3) 1344 1343 { 1345 1344 m_jit.setupArgumentsWithExecState(arg1, arg2, arg3); 1346 1345 return appendCallWithExceptionCheck(operation); 1347 1346 } 1348 JITCompiler::Call callOperation(V_ DFGOperation_EPZJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3)1347 JITCompiler::Call callOperation(V_JITOperation_EPZJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3) 1349 1348 { 1350 1349 m_jit.setupArgumentsWithExecState(arg1, arg2, arg3); … … 1352 1351 } 1353 1352 1354 JITCompiler::Call callOperation(V_ DFGOperation_EOZJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3)1353 JITCompiler::Call callOperation(V_JITOperation_EOZJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3) 1355 1354 { 1356 1355 m_jit.setupArgumentsWithExecState(arg1, arg2, arg3); 1357 1356 return appendCallWithExceptionCheck(operation); 1358 1357 } 1359 JITCompiler::Call callOperation(V_ DFGOperation_ECJJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3)1358 JITCompiler::Call callOperation(V_JITOperation_ECJJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3) 1360 1359 { 1361 1360 m_jit.setupArgumentsWithExecState(arg1, arg2, arg3); … … 1363 1362 } 1364 1363 1365 JITCompiler::Call callOperation(D_ DFGOperation_EJ operation, FPRReg result, GPRReg arg1)1364 JITCompiler::Call callOperation(D_JITOperation_EJ operation, FPRReg result, GPRReg arg1) 1366 1365 { 1367 1366 m_jit.setupArgumentsWithExecState(arg1); … … 1387 1386 #endif 1388 1387 1389 JITCompiler::Call callOperation(Z_ DFGOperation_D operation, GPRReg result, FPRReg arg1)1388 JITCompiler::Call callOperation(Z_JITOperation_D operation, GPRReg result, FPRReg arg1) 1390 1389 { 1391 1390 prepareForExternalCall(); … … 1395 1394 return call; 1396 1395 } 1397 JITCompiler::Call callOperation(J_ DFGOperation_E operation, GPRReg resultTag, GPRReg resultPayload)1396 JITCompiler::Call callOperation(J_JITOperation_E operation, GPRReg resultTag, GPRReg resultPayload) 1398 1397 { 1399 1398 m_jit.setupArgumentsExecState(); 1400 1399 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1401 1400 } 1402 JITCompiler::Call callOperation(J_ DFGOperation_EP operation, GPRReg resultTag, GPRReg resultPayload, void* pointer)1401 JITCompiler::Call callOperation(J_JITOperation_EP operation, GPRReg resultTag, GPRReg resultPayload, void* pointer) 1403 1402 { 1404 1403 m_jit.setupArgumentsWithExecState(TrustedImmPtr(pointer)); 1405 1404 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1406 1405 } 1407 JITCompiler::Call callOperation(J_ DFGOperation_EPP operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, void* pointer)1406 JITCompiler::Call callOperation(J_JITOperation_EPP operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, void* pointer) 1408 1407 { 1409 1408 m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(pointer)); 1410 1409 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1411 1410 } 1412 JITCompiler::Call callOperation(J_ DFGOperation_EP operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1)1411 JITCompiler::Call callOperation(J_JITOperation_EP operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1) 1413 1412 { 1414 1413 m_jit.setupArgumentsWithExecState(arg1); 1415 1414 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1416 1415 } 1417 JITCompiler::Call callOperation(J_ DFGOperation_EI operation, GPRReg resultTag, GPRReg resultPayload, StringImpl* uid)1416 JITCompiler::Call callOperation(J_JITOperation_EI operation, GPRReg resultTag, GPRReg resultPayload, StringImpl* uid) 1418 1417 { 1419 1418 m_jit.setupArgumentsWithExecState(TrustedImmPtr(uid)); 1420 1419 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1421 1420 } 1422 JITCompiler::Call callOperation(J_ DFGOperation_EA operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1)1421 JITCompiler::Call callOperation(J_JITOperation_EA operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1) 1423 1422 { 1424 1423 m_jit.setupArgumentsWithExecState(arg1); 1425 1424 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1426 1425 } 1427 JITCompiler::Call callOperation(J_ DFGOperation_EAZ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, GPRReg arg2)1426 JITCompiler::Call callOperation(J_JITOperation_EAZ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, GPRReg arg2) 1428 1427 { 1429 1428 m_jit.setupArgumentsWithExecState(arg1, arg2); 1430 1429 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1431 1430 } 1432 JITCompiler::Call callOperation(J_ DFGOperation_EJssZ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, GPRReg arg2)1431 JITCompiler::Call callOperation(J_JITOperation_EJssZ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, GPRReg arg2) 1433 1432 { 1434 1433 m_jit.setupArgumentsWithExecState(arg1, arg2); 1435 1434 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1436 1435 } 1437 JITCompiler::Call callOperation(J_ DFGOperation_EPS operation, GPRReg resultTag, GPRReg resultPayload, void* pointer, size_t size)1436 JITCompiler::Call callOperation(J_JITOperation_EPS operation, GPRReg resultTag, GPRReg resultPayload, void* pointer, size_t size) 1438 1437 { 1439 1438 m_jit.setupArgumentsWithExecState(TrustedImmPtr(pointer), TrustedImmPtr(size)); 1440 1439 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1441 1440 } 1442 JITCompiler::Call callOperation(J_ DFGOperation_ESS operation, GPRReg resultTag, GPRReg resultPayload, int startConstant, int numConstants)1441 JITCompiler::Call callOperation(J_JITOperation_ESS operation, GPRReg resultTag, GPRReg resultPayload, int startConstant, int numConstants) 1443 1442 { 1444 1443 m_jit.setupArgumentsWithExecState(TrustedImm32(startConstant), TrustedImm32(numConstants)); 1445 1444 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1446 1445 } 1447 JITCompiler::Call callOperation(J_ DFGOperation_EJP operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, void* pointer)1446 JITCompiler::Call callOperation(J_JITOperation_EJP operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, void* pointer) 1448 1447 { 1449 1448 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, TrustedImmPtr(pointer)); 1450 1449 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1451 1450 } 1452 JITCompiler::Call callOperation(J_ DFGOperation_EJP operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2)1451 JITCompiler::Call callOperation(J_JITOperation_EJP operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2) 1453 1452 { 1454 1453 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, arg2); … … 1456 1455 } 1457 1456 1458 JITCompiler::Call callOperation(J_ DFGOperation_EC operation, GPRReg resultTag, GPRReg resultPayload, JSCell* cell)1457 JITCompiler::Call callOperation(J_JITOperation_EC operation, GPRReg resultTag, GPRReg resultPayload, JSCell* cell) 1459 1458 { 1460 1459 m_jit.setupArgumentsWithExecState(TrustedImmPtr(cell)); 1461 1460 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1462 1461 } 1463 JITCompiler::Call callOperation(J_ DFGOperation_ECI operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, const StringImpl* uid)1462 JITCompiler::Call callOperation(J_JITOperation_ECI operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, const StringImpl* uid) 1464 1463 { 1465 1464 m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(uid)); 1466 1465 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1467 1466 } 1468 JITCompiler::Call callOperation(J_ DFGOperation_EJI operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, StringImpl* uid)1467 JITCompiler::Call callOperation(J_JITOperation_EJI operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, StringImpl* uid) 1469 1468 { 1470 1469 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, TrustedImmPtr(uid)); 1471 1470 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1472 1471 } 1473 JITCompiler::Call callOperation(J_ DFGOperation_EJI operation, GPRReg resultTag, GPRReg resultPayload, int32_t arg1Tag, GPRReg arg1Payload, StringImpl* uid)1472 JITCompiler::Call callOperation(J_JITOperation_EJI operation, GPRReg resultTag, GPRReg resultPayload, int32_t arg1Tag, GPRReg arg1Payload, StringImpl* uid) 1474 1473 { 1475 1474 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, TrustedImm32(arg1Tag), TrustedImmPtr(uid)); 1476 1475 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1477 1476 } 1478 JITCompiler::Call callOperation(J_ DFGOperation_EDA operation, GPRReg resultTag, GPRReg resultPayload, FPRReg arg1, GPRReg arg2)1477 JITCompiler::Call callOperation(J_JITOperation_EDA operation, GPRReg resultTag, GPRReg resultPayload, FPRReg arg1, GPRReg arg2) 1479 1478 { 1480 1479 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1, arg2); 1481 1480 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1482 1481 } 1483 JITCompiler::Call callOperation(J_ DFGOperation_EJA operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2)1482 JITCompiler::Call callOperation(J_JITOperation_EJA operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2) 1484 1483 { 1485 1484 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, arg2); 1486 1485 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1487 1486 } 1488 JITCompiler::Call callOperation(J_ DFGOperation_EJA operation, GPRReg resultTag, GPRReg resultPayload, TrustedImm32 arg1Tag, GPRReg arg1Payload, GPRReg arg2)1487 JITCompiler::Call callOperation(J_JITOperation_EJA operation, GPRReg resultTag, GPRReg resultPayload, TrustedImm32 arg1Tag, GPRReg arg1Payload, GPRReg arg2) 1489 1488 { 1490 1489 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, arg2); 1491 1490 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1492 1491 } 1493 JITCompiler::Call callOperation(J_ DFGOperation_EJ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload)1492 JITCompiler::Call callOperation(J_JITOperation_EJ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload) 1494 1493 { 1495 1494 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag); 1496 1495 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1497 1496 } 1498 JITCompiler::Call callOperation(J_ DFGOperation_EZ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1)1497 JITCompiler::Call callOperation(J_JITOperation_EZ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1) 1499 1498 { 1500 1499 m_jit.setupArgumentsWithExecState(arg1); 1501 1500 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1502 1501 } 1503 JITCompiler::Call callOperation(J_ DFGOperation_EZ operation, GPRReg resultTag, GPRReg resultPayload, int32_t arg1)1502 JITCompiler::Call callOperation(J_JITOperation_EZ operation, GPRReg resultTag, GPRReg resultPayload, int32_t arg1) 1504 1503 { 1505 1504 m_jit.setupArgumentsWithExecState(TrustedImm32(arg1)); 1506 1505 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1507 1506 } 1508 JITCompiler::Call callOperation(J_ DFGOperation_EZIcfZ operation, GPRReg resultTag, GPRReg resultPayload, int32_t arg1, InlineCallFrame* inlineCallFrame, GPRReg arg2)1507 JITCompiler::Call callOperation(J_JITOperation_EZIcfZ operation, GPRReg resultTag, GPRReg resultPayload, int32_t arg1, InlineCallFrame* inlineCallFrame, GPRReg arg2) 1509 1508 { 1510 1509 m_jit.setupArgumentsWithExecState(TrustedImm32(arg1), TrustedImmPtr(inlineCallFrame), arg2); 1511 1510 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1512 1511 } 1513 JITCompiler::Call callOperation(J_ DFGOperation_EZZ operation, GPRReg resultTag, GPRReg resultPayload, int32_t arg1, GPRReg arg2)1512 JITCompiler::Call callOperation(J_JITOperation_EZZ operation, GPRReg resultTag, GPRReg resultPayload, int32_t arg1, GPRReg arg2) 1514 1513 { 1515 1514 m_jit.setupArgumentsWithExecState(TrustedImm32(arg1), arg2); … … 1517 1516 } 1518 1517 1519 JITCompiler::Call callOperation(P_ DFGOperation_EJS operation, GPRReg result, JSValueRegs value, size_t index)1518 JITCompiler::Call callOperation(P_JITOperation_EJS operation, GPRReg result, JSValueRegs value, size_t index) 1520 1519 { 1521 1520 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG value.payloadGPR(), value.tagGPR(), TrustedImmPtr(index)); … … 1523 1522 } 1524 1523 1525 JITCompiler::Call callOperation(P_ DFGOperation_EStJ operation, GPRReg result, Structure* structure, GPRReg arg2Tag, GPRReg arg2Payload)1524 JITCompiler::Call callOperation(P_JITOperation_EStJ operation, GPRReg result, Structure* structure, GPRReg arg2Tag, GPRReg arg2Payload) 1526 1525 { 1527 1526 m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), arg2Payload, arg2Tag); … … 1529 1528 } 1530 1529 1531 JITCompiler::Call callOperation(C_ DFGOperation_EJ operation, GPRReg result, GPRReg arg1Tag, GPRReg arg1Payload)1530 JITCompiler::Call callOperation(C_JITOperation_EJ operation, GPRReg result, GPRReg arg1Tag, GPRReg arg1Payload) 1532 1531 { 1533 1532 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag); 1534 1533 return appendCallWithExceptionCheckSetResult(operation, result); 1535 1534 } 1536 JITCompiler::Call callOperation(S_ DFGOperation_J operation, GPRReg result, GPRReg arg1Tag, GPRReg arg1Payload)1535 JITCompiler::Call callOperation(S_JITOperation_J operation, GPRReg result, GPRReg arg1Tag, GPRReg arg1Payload) 1537 1536 { 1538 1537 m_jit.setupArguments(arg1Payload, arg1Tag); 1539 1538 return appendCallSetResult(operation, result); 1540 1539 } 1541 JITCompiler::Call callOperation(S_ DFGOperation_EJ operation, GPRReg result, GPRReg arg1Tag, GPRReg arg1Payload)1540 JITCompiler::Call callOperation(S_JITOperation_EJ operation, GPRReg result, GPRReg arg1Tag, GPRReg arg1Payload) 1542 1541 { 1543 1542 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag); … … 1545 1544 } 1546 1545 1547 JITCompiler::Call callOperation(S_ DFGOperation_EJJ operation, GPRReg result, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2Tag, GPRReg arg2Payload)1546 JITCompiler::Call callOperation(S_JITOperation_EJJ operation, GPRReg result, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2Tag, GPRReg arg2Payload) 1548 1547 { 1549 1548 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, SH4_32BIT_DUMMY_ARG arg2Payload, arg2Tag); 1550 1549 return appendCallWithExceptionCheckSetResult(operation, result); 1551 1550 } 1552 JITCompiler::Call callOperation(J_ DFGOperation_EJJ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2Tag, GPRReg arg2Payload)1551 JITCompiler::Call callOperation(J_JITOperation_EJJ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2Tag, GPRReg arg2Payload) 1553 1552 { 1554 1553 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, SH4_32BIT_DUMMY_ARG arg2Payload, arg2Tag); 1555 1554 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1556 1555 } 1557 JITCompiler::Call callOperation(J_ DFGOperation_EJJ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, MacroAssembler::TrustedImm32 imm)1556 JITCompiler::Call callOperation(J_JITOperation_EJJ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1Tag, GPRReg arg1Payload, MacroAssembler::TrustedImm32 imm) 1558 1557 { 1559 1558 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, SH4_32BIT_DUMMY_ARG imm, TrustedImm32(JSValue::Int32Tag)); 1560 1559 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1561 1560 } 1562 JITCompiler::Call callOperation(J_ DFGOperation_EJJ operation, GPRReg resultTag, GPRReg resultPayload, MacroAssembler::TrustedImm32 imm, GPRReg arg2Tag, GPRReg arg2Payload)1561 JITCompiler::Call callOperation(J_JITOperation_EJJ operation, GPRReg resultTag, GPRReg resultPayload, MacroAssembler::TrustedImm32 imm, GPRReg arg2Tag, GPRReg arg2Payload) 1563 1562 { 1564 1563 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG imm, TrustedImm32(JSValue::Int32Tag), SH4_32BIT_DUMMY_ARG arg2Payload, arg2Tag); … … 1566 1565 } 1567 1566 1568 JITCompiler::Call callOperation(J_ DFGOperation_ECJ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, GPRReg arg2Tag, GPRReg arg2Payload)1567 JITCompiler::Call callOperation(J_JITOperation_ECJ operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, GPRReg arg2Tag, GPRReg arg2Payload) 1569 1568 { 1570 1569 m_jit.setupArgumentsWithExecState(arg1, arg2Payload, arg2Tag); 1571 1570 return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag); 1572 1571 } 1573 JITCompiler::Call callOperation(J_ DFGOperation_ECJ operation, JSValueRegs result, GPRReg arg1, JSValueRegs arg2)1572 JITCompiler::Call callOperation(J_JITOperation_ECJ operation, JSValueRegs result, GPRReg arg1, JSValueRegs arg2) 1574 1573 { 1575 1574 m_jit.setupArgumentsWithExecState(arg1, arg2.payloadGPR(), arg2.tagGPR()); 1576 1575 return appendCallWithExceptionCheckSetResult(operation, result.payloadGPR(), result.tagGPR()); 1577 1576 } 1578 JITCompiler::Call callOperation(J_ DFGOperation_ECC operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, GPRReg arg2)1577 JITCompiler::Call callOperation(J_JITOperation_ECC operation, GPRReg resultTag, GPRReg resultPayload, GPRReg arg1, GPRReg arg2) 1579 1578 { 1580 1579 m_jit.setupArgumentsWithExecState(arg1, arg2); … … 1582 1581 } 1583 1582 1584 JITCompiler::Call callOperation(V_ DFGOperation_EOZD operation, GPRReg arg1, GPRReg arg2, FPRReg arg3)1583 JITCompiler::Call callOperation(V_JITOperation_EOZD operation, GPRReg arg1, GPRReg arg2, FPRReg arg3) 1585 1584 { 1586 1585 m_jit.setupArgumentsWithExecState(arg1, arg2, EABI_32BIT_DUMMY_ARG arg3); … … 1588 1587 } 1589 1588 1590 JITCompiler::Call callOperation(V_ DFGOperation_EJPP operation, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2, void* pointer)1589 JITCompiler::Call callOperation(V_JITOperation_EJPP operation, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2, void* pointer) 1591 1590 { 1592 1591 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, arg2, TrustedImmPtr(pointer)); 1593 1592 return appendCallWithExceptionCheck(operation); 1594 1593 } 1595 JITCompiler::Call callOperation(V_ DFGOperation_EJCI operation, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2, StringImpl* uid)1594 JITCompiler::Call callOperation(V_JITOperation_EJCI operation, GPRReg arg1Tag, GPRReg arg1Payload, GPRReg arg2, StringImpl* uid) 1596 1595 { 1597 1596 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, arg2, TrustedImmPtr(uid)); 1598 1597 return appendCallWithExceptionCheck(operation); 1599 1598 } 1600 JITCompiler::Call callOperation(V_ DFGOperation_ECJJ operation, GPRReg arg1, GPRReg arg2Tag, GPRReg arg2Payload, GPRReg arg3Tag, GPRReg arg3Payload)1599 JITCompiler::Call callOperation(V_JITOperation_ECJJ operation, GPRReg arg1, GPRReg arg2Tag, GPRReg arg2Payload, GPRReg arg3Tag, GPRReg arg3Payload) 1601 1600 { 1602 1601 m_jit.setupArgumentsWithExecState(arg1, arg2Payload, arg2Tag, arg3Payload, arg3Tag); … … 1604 1603 } 1605 1604 1606 JITCompiler::Call callOperation(V_ DFGOperation_EPZJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3Tag, GPRReg arg3Payload)1605 JITCompiler::Call callOperation(V_JITOperation_EPZJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3Tag, GPRReg arg3Payload) 1607 1606 { 1608 1607 m_jit.setupArgumentsWithExecState(arg1, arg2, EABI_32BIT_DUMMY_ARG SH4_32BIT_DUMMY_ARG arg3Payload, arg3Tag); … … 1610 1609 } 1611 1610 1612 JITCompiler::Call callOperation(V_ DFGOperation_EOZJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3Tag, GPRReg arg3Payload)1611 JITCompiler::Call callOperation(V_JITOperation_EOZJ operation, GPRReg arg1, GPRReg arg2, GPRReg arg3Tag, GPRReg arg3Payload) 1613 1612 { 1614 1613 m_jit.setupArgumentsWithExecState(arg1, arg2, EABI_32BIT_DUMMY_ARG SH4_32BIT_DUMMY_ARG arg3Payload, arg3Tag); 1615 1614 return appendCallWithExceptionCheck(operation); 1616 1615 } 1617 JITCompiler::Call callOperation(V_ DFGOperation_EOZJ operation, GPRReg arg1, GPRReg arg2, TrustedImm32 arg3Tag, GPRReg arg3Payload)1616 JITCompiler::Call callOperation(V_JITOperation_EOZJ operation, GPRReg arg1, GPRReg arg2, TrustedImm32 arg3Tag, GPRReg arg3Payload) 1618 1617 { 1619 1618 m_jit.setupArgumentsWithExecState(arg1, arg2, EABI_32BIT_DUMMY_ARG SH4_32BIT_DUMMY_ARG arg3Payload, arg3Tag); … … 1621 1620 } 1622 1621 1623 JITCompiler::Call callOperation(D_ DFGOperation_EJ operation, FPRReg result, GPRReg arg1Tag, GPRReg arg1Payload)1622 JITCompiler::Call callOperation(D_JITOperation_EJ operation, FPRReg result, GPRReg arg1Tag, GPRReg arg1Payload) 1624 1623 { 1625 1624 m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag); … … 1924 1923 } 1925 1924 1926 bool compare(Node*, MacroAssembler::RelationalCondition, MacroAssembler::DoubleCondition, S_ DFGOperation_EJJ);1927 bool compilePeepHoleBranch(Node*, MacroAssembler::RelationalCondition, MacroAssembler::DoubleCondition, S_ DFGOperation_EJJ);1925 bool compare(Node*, MacroAssembler::RelationalCondition, MacroAssembler::DoubleCondition, S_JITOperation_EJJ); 1926 bool compilePeepHoleBranch(Node*, MacroAssembler::RelationalCondition, MacroAssembler::DoubleCondition, S_JITOperation_EJJ); 1928 1927 void compilePeepHoleInt32Branch(Node*, Node* branchNode, JITCompiler::RelationalCondition); 1929 1928 void compilePeepHoleInt52Branch(Node*, Node* branchNode, JITCompiler::RelationalCondition); -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
r156300 r156490 33 33 #include "DFGAbstractInterpreterInlines.h" 34 34 #include "DFGCallArrayAllocatorSlowPathGenerator.h" 35 #include "DFGOperations.h" 35 36 #include "DFGSlowPathGenerator.h" 36 37 #include "JSActivation.h" … … 262 263 263 264 JITCompiler::Label doneLabel = m_jit.label(); 264 V_ DFGOperation_EJCI optimizedCall;265 V_JITOperation_EJCI optimizedCall; 265 266 if (m_jit.strictModeFor(m_currentNode->codeOrigin)) { 266 267 if (putKind == Direct) … … 441 442 } 442 443 443 void SpeculativeJIT::nonSpeculativePeepholeBranch(Node* node, Node* branchNode, MacroAssembler::RelationalCondition cond, S_ DFGOperation_EJJ helperFunction)444 void SpeculativeJIT::nonSpeculativePeepholeBranch(Node* node, Node* branchNode, MacroAssembler::RelationalCondition cond, S_JITOperation_EJJ helperFunction) 444 445 { 445 446 BasicBlock* taken = branchNode->takenBlock(); … … 513 514 template<typename JumpType> 514 515 class CompareAndBoxBooleanSlowPathGenerator 515 : public CallSlowPathGenerator<JumpType, S_ DFGOperation_EJJ, GPRReg> {516 : public CallSlowPathGenerator<JumpType, S_JITOperation_EJJ, GPRReg> { 516 517 public: 517 518 CompareAndBoxBooleanSlowPathGenerator( 518 519 JumpType from, SpeculativeJIT* jit, 519 S_ DFGOperation_EJJ function, GPRReg result, GPRReg arg1Tag, GPRReg arg1Payload,520 S_JITOperation_EJJ function, GPRReg result, GPRReg arg1Tag, GPRReg arg1Payload, 520 521 GPRReg arg2Tag, GPRReg arg2Payload) 521 : CallSlowPathGenerator<JumpType, S_ DFGOperation_EJJ, GPRReg>(522 : CallSlowPathGenerator<JumpType, S_JITOperation_EJJ, GPRReg>( 522 523 from, jit, function, NeedToSpill, result) 523 524 , m_arg1Tag(arg1Tag) … … 547 548 }; 548 549 549 void SpeculativeJIT::nonSpeculativeNonPeepholeCompare(Node* node, MacroAssembler::RelationalCondition cond, S_ DFGOperation_EJJ helperFunction)550 void SpeculativeJIT::nonSpeculativeNonPeepholeCompare(Node* node, MacroAssembler::RelationalCondition cond, S_JITOperation_EJJ helperFunction) 550 551 { 551 552 JSValueOperand arg1(this, node->child1()); … … 3607 3608 m_jit.move(thisValuePayloadGPR, tempGPR); 3608 3609 m_jit.move(thisValueTagGPR, tempTagGPR); 3609 J_ DFGOperation_EJ function;3610 J_JITOperation_EJ function; 3610 3611 if (m_jit.graph().executableFor(node->codeOrigin)->isStrictMode()) 3611 3612 function = operationToThisStrict; -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
r156482 r156490 33 33 #include "DFGAbstractInterpreterInlines.h" 34 34 #include "DFGCallArrayAllocatorSlowPathGenerator.h" 35 #include "DFGOperations.h" 35 36 #include "DFGSlowPathGenerator.h" 36 37 #include "JSCJSValueInlines.h" … … 254 255 JITCompiler::Label doneLabel = m_jit.label(); 255 256 256 V_ DFGOperation_EJCI optimizedCall;257 V_JITOperation_EJCI optimizedCall; 257 258 if (m_jit.strictModeFor(m_currentNode->codeOrigin)) { 258 259 if (putKind == Direct) … … 429 430 } 430 431 431 void SpeculativeJIT::nonSpeculativePeepholeBranch(Node* node, Node* branchNode, MacroAssembler::RelationalCondition cond, S_ DFGOperation_EJJ helperFunction)432 void SpeculativeJIT::nonSpeculativePeepholeBranch(Node* node, Node* branchNode, MacroAssembler::RelationalCondition cond, S_JITOperation_EJJ helperFunction) 432 433 { 433 434 BasicBlock* taken = branchNode->takenBlock(); … … 499 500 template<typename JumpType> 500 501 class CompareAndBoxBooleanSlowPathGenerator 501 : public CallSlowPathGenerator<JumpType, S_ DFGOperation_EJJ, GPRReg> {502 : public CallSlowPathGenerator<JumpType, S_JITOperation_EJJ, GPRReg> { 502 503 public: 503 504 CompareAndBoxBooleanSlowPathGenerator( 504 505 JumpType from, SpeculativeJIT* jit, 505 S_ DFGOperation_EJJ function, GPRReg result, GPRReg arg1, GPRReg arg2)506 : CallSlowPathGenerator<JumpType, S_ DFGOperation_EJJ, GPRReg>(506 S_JITOperation_EJJ function, GPRReg result, GPRReg arg1, GPRReg arg2) 507 : CallSlowPathGenerator<JumpType, S_JITOperation_EJJ, GPRReg>( 507 508 from, jit, function, NeedToSpill, result) 508 509 , m_arg1(arg1) … … 526 527 }; 527 528 528 void SpeculativeJIT::nonSpeculativeNonPeepholeCompare(Node* node, MacroAssembler::RelationalCondition cond, S_ DFGOperation_EJJ helperFunction)529 void SpeculativeJIT::nonSpeculativeNonPeepholeCompare(Node* node, MacroAssembler::RelationalCondition cond, S_JITOperation_EJJ helperFunction) 529 530 { 530 531 JSValueOperand arg1(this, node->child1()); … … 3903 3904 TrustedImm32(FinalObjectType))); 3904 3905 m_jit.move(thisValueGPR, tempGPR); 3905 J_ DFGOperation_EJ function;3906 J_JITOperation_EJ function; 3906 3907 if (m_jit.graph().executableFor(node->codeOrigin)->isStrictMode()) 3907 3908 function = operationToThisStrict; -
trunk/Source/JavaScriptCore/dfg/DFGThunks.cpp
r156237 r156490 94 94 } 95 95 96 inline void emitPointerValidation(CCallHelpers& jit, GPRReg pointerGPR)97 {98 #if !ASSERT_DISABLED99 CCallHelpers::Jump isNonZero = jit.branchTestPtr(CCallHelpers::NonZero, pointerGPR);100 jit.breakpoint();101 isNonZero.link(&jit);102 jit.push(pointerGPR);103 jit.load8(pointerGPR, pointerGPR);104 jit.pop(pointerGPR);105 #else106 UNUSED_PARAM(jit);107 UNUSED_PARAM(pointerGPR);108 #endif109 }110 111 MacroAssemblerCodeRef throwExceptionFromCallSlowPathGenerator(VM* vm)112 {113 CCallHelpers jit(vm);114 115 // We will jump to here if the JIT code thinks it's making a call, but the116 // linking helper (C++ code) decided to throw an exception instead. We will117 // have saved the callReturnIndex in the first arguments of JITStackFrame.118 // Note that the return address will be on the stack at this point, so we119 // need to remove it and drop it on the floor, since we don't care about it.120 // Finally note that the call frame register points at the callee frame, so121 // we need to pop it.122 jit.preserveReturnAddressAfterCall(GPRInfo::nonPreservedNonReturnGPR);123 jit.loadPtr(124 CCallHelpers::Address(125 GPRInfo::callFrameRegister,126 static_cast<ptrdiff_t>(sizeof(Register)) * JSStack::CallerFrame),127 GPRInfo::callFrameRegister);128 #if USE(JSVALUE64)129 jit.peek64(GPRInfo::nonPreservedNonReturnGPR, JITSTACKFRAME_ARGS_INDEX);130 #else131 jit.peek(GPRInfo::nonPreservedNonReturnGPR, JITSTACKFRAME_ARGS_INDEX);132 #endif133 jit.setupArgumentsWithExecState(GPRInfo::nonPreservedNonReturnGPR);134 jit.move(CCallHelpers::TrustedImmPtr(bitwise_cast<void*>(lookupExceptionHandler)), GPRInfo::nonArgGPR0);135 emitPointerValidation(jit, GPRInfo::nonArgGPR0);136 jit.call(GPRInfo::nonArgGPR0);137 emitPointerValidation(jit, GPRInfo::returnValueGPR2);138 jit.jump(GPRInfo::returnValueGPR2);139 140 LinkBuffer patchBuffer(*vm, &jit, GLOBAL_THUNK_ID);141 return FINALIZE_CODE(patchBuffer, ("DFG throw exception from call slow path thunk"));142 }143 144 static void slowPathFor(145 CCallHelpers& jit, VM* vm, P_DFGOperation_E slowPathFunction)146 {147 jit.preserveReturnAddressAfterCall(GPRInfo::nonArgGPR2);148 emitPointerValidation(jit, GPRInfo::nonArgGPR2);149 jit.storePtr(150 GPRInfo::nonArgGPR2,151 CCallHelpers::Address(152 GPRInfo::callFrameRegister,153 static_cast<ptrdiff_t>(sizeof(Register)) * JSStack::ReturnPC));154 jit.storePtr(GPRInfo::callFrameRegister, &vm->topCallFrame);155 #if USE(JSVALUE64)156 jit.poke64(GPRInfo::nonPreservedNonReturnGPR, JITSTACKFRAME_ARGS_INDEX);157 #else158 jit.poke(GPRInfo::nonPreservedNonReturnGPR, JITSTACKFRAME_ARGS_INDEX);159 #endif160 jit.setupArgumentsExecState();161 jit.move(CCallHelpers::TrustedImmPtr(bitwise_cast<void*>(slowPathFunction)), GPRInfo::nonArgGPR0);162 emitPointerValidation(jit, GPRInfo::nonArgGPR0);163 jit.call(GPRInfo::nonArgGPR0);164 165 // This slow call will return the address of one of the following:166 // 1) Exception throwing thunk.167 // 2) Host call return value returner thingy.168 // 3) The function to call.169 jit.loadPtr(170 CCallHelpers::Address(171 GPRInfo::callFrameRegister,172 static_cast<ptrdiff_t>(sizeof(Register)) * JSStack::ReturnPC),173 GPRInfo::nonPreservedNonReturnGPR);174 jit.storePtr(175 CCallHelpers::TrustedImmPtr(0),176 CCallHelpers::Address(177 GPRInfo::callFrameRegister,178 static_cast<ptrdiff_t>(sizeof(Register)) * JSStack::ReturnPC));179 emitPointerValidation(jit, GPRInfo::nonPreservedNonReturnGPR);180 jit.restoreReturnAddressBeforeReturn(GPRInfo::nonPreservedNonReturnGPR);181 emitPointerValidation(jit, GPRInfo::returnValueGPR);182 jit.jump(GPRInfo::returnValueGPR);183 }184 185 static MacroAssemblerCodeRef linkForThunkGenerator(186 VM* vm, CodeSpecializationKind kind)187 {188 // The return address is on the stack or in the link register. We will hence189 // save the return address to the call frame while we make a C++ function call190 // to perform linking and lazy compilation if necessary. We expect the callee191 // to be in nonArgGPR0/nonArgGPR1 (payload/tag), the call frame to have already192 // been adjusted, nonPreservedNonReturnGPR holds the exception handler index,193 // and all other registers to be available for use. We use JITStackFrame::args194 // to save important information across calls.195 196 CCallHelpers jit(vm);197 198 slowPathFor(jit, vm, kind == CodeForCall ? operationLinkCall : operationLinkConstruct);199 200 LinkBuffer patchBuffer(*vm, &jit, GLOBAL_THUNK_ID);201 return FINALIZE_CODE(202 patchBuffer,203 ("DFG link %s slow path thunk", kind == CodeForCall ? "call" : "construct"));204 }205 206 MacroAssemblerCodeRef linkCallThunkGenerator(VM* vm)207 {208 return linkForThunkGenerator(vm, CodeForCall);209 }210 211 MacroAssemblerCodeRef linkConstructThunkGenerator(VM* vm)212 {213 return linkForThunkGenerator(vm, CodeForConstruct);214 }215 216 // For closure optimizations, we only include calls, since if you're using closures for217 // object construction then you're going to lose big time anyway.218 MacroAssemblerCodeRef linkClosureCallThunkGenerator(VM* vm)219 {220 CCallHelpers jit(vm);221 222 slowPathFor(jit, vm, operationLinkClosureCall);223 224 LinkBuffer patchBuffer(*vm, &jit, GLOBAL_THUNK_ID);225 return FINALIZE_CODE(patchBuffer, ("DFG link closure call slow path thunk"));226 }227 228 static MacroAssemblerCodeRef virtualForThunkGenerator(229 VM* vm, CodeSpecializationKind kind)230 {231 // The return address is on the stack, or in the link register. We will hence232 // jump to the callee, or save the return address to the call frame while we233 // make a C++ function call to the appropriate DFG operation.234 235 CCallHelpers jit(vm);236 237 CCallHelpers::JumpList slowCase;238 239 // FIXME: we should have a story for eliminating these checks. In many cases,240 // the DFG knows that the value is definitely a cell, or definitely a function.241 242 #if USE(JSVALUE64)243 slowCase.append(244 jit.branchTest64(245 CCallHelpers::NonZero, GPRInfo::nonArgGPR0, GPRInfo::tagMaskRegister));246 #else247 slowCase.append(248 jit.branch32(249 CCallHelpers::NotEqual, GPRInfo::nonArgGPR1,250 CCallHelpers::TrustedImm32(JSValue::CellTag)));251 #endif252 jit.loadPtr(CCallHelpers::Address(GPRInfo::nonArgGPR0, JSCell::structureOffset()), GPRInfo::nonArgGPR2);253 slowCase.append(254 jit.branchPtr(255 CCallHelpers::NotEqual,256 CCallHelpers::Address(GPRInfo::nonArgGPR2, Structure::classInfoOffset()),257 CCallHelpers::TrustedImmPtr(JSFunction::info())));258 259 // Now we know we have a JSFunction.260 261 jit.loadPtr(262 CCallHelpers::Address(GPRInfo::nonArgGPR0, JSFunction::offsetOfExecutable()),263 GPRInfo::nonArgGPR2);264 slowCase.append(265 jit.branch32(266 CCallHelpers::LessThan,267 CCallHelpers::Address(268 GPRInfo::nonArgGPR2, ExecutableBase::offsetOfNumParametersFor(kind)),269 CCallHelpers::TrustedImm32(0)));270 271 // Now we know that we have a CodeBlock, and we're committed to making a fast272 // call.273 274 jit.loadPtr(275 CCallHelpers::Address(GPRInfo::nonArgGPR0, JSFunction::offsetOfScopeChain()),276 GPRInfo::nonArgGPR1);277 #if USE(JSVALUE64)278 jit.store64(279 GPRInfo::nonArgGPR1,280 CCallHelpers::Address(281 GPRInfo::callFrameRegister,282 static_cast<ptrdiff_t>(sizeof(Register)) * JSStack::ScopeChain));283 #else284 jit.storePtr(285 GPRInfo::nonArgGPR1,286 CCallHelpers::Address(287 GPRInfo::callFrameRegister,288 static_cast<ptrdiff_t>(sizeof(Register)) * JSStack::ScopeChain +289 OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.payload)));290 jit.store32(291 CCallHelpers::TrustedImm32(JSValue::CellTag),292 CCallHelpers::Address(293 GPRInfo::callFrameRegister,294 static_cast<ptrdiff_t>(sizeof(Register)) * JSStack::ScopeChain +295 OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.tag)));296 #endif297 298 jit.loadPtr(299 CCallHelpers::Address(GPRInfo::nonArgGPR2, ExecutableBase::offsetOfJITCodeWithArityCheckFor(kind)),300 GPRInfo::regT0);301 302 // Make a tail call. This will return back to DFG code.303 emitPointerValidation(jit, GPRInfo::regT0);304 jit.jump(GPRInfo::regT0);305 306 slowCase.link(&jit);307 308 // Here we don't know anything, so revert to the full slow path.309 310 slowPathFor(jit, vm, kind == CodeForCall ? operationVirtualCall : operationVirtualConstruct);311 312 LinkBuffer patchBuffer(*vm, &jit, GLOBAL_THUNK_ID);313 return FINALIZE_CODE(314 patchBuffer,315 ("DFG virtual %s slow path thunk", kind == CodeForCall ? "call" : "construct"));316 }317 318 MacroAssemblerCodeRef virtualCallThunkGenerator(VM* vm)319 {320 return virtualForThunkGenerator(vm, CodeForCall);321 }322 323 MacroAssemblerCodeRef virtualConstructThunkGenerator(VM* vm)324 {325 return virtualForThunkGenerator(vm, CodeForConstruct);326 }327 328 96 } } // namespace JSC::DFG 329 97 -
trunk/Source/JavaScriptCore/dfg/DFGThunks.h
r156237 r156490 41 41 MacroAssemblerCodeRef osrExitGenerationThunkGenerator(VM*); 42 42 43 MacroAssemblerCodeRef throwExceptionFromCallSlowPathGenerator(VM*);44 45 MacroAssemblerCodeRef linkCallThunkGenerator(VM*);46 MacroAssemblerCodeRef linkConstructThunkGenerator(VM*);47 48 MacroAssemblerCodeRef linkClosureCallThunkGenerator(VM*);49 50 MacroAssemblerCodeRef virtualCallThunkGenerator(VM*);51 MacroAssemblerCodeRef virtualConstructThunkGenerator(VM*);52 53 43 } } // namespace JSC::DFG 54 44 -
trunk/Source/JavaScriptCore/ftl/FTLIntrinsicRepository.h
r156237 r156490 49 49 50 50 #define FOR_EACH_FUNCTION_TYPE(macro) \ 51 macro(I_ DFGOperation_EJss, functionType(intPtr, intPtr, intPtr)) \52 macro(J_ DFGOperation_E, functionType(int64, intPtr)) \53 macro(P_ DFGOperation_EC, functionType(intPtr, intPtr, intPtr)) \54 macro(V_ DFGOperation_EOZD, functionType(voidType, intPtr, intPtr, int32, doubleType)) \55 macro(V_ DFGOperation_EOZJ, functionType(voidType, intPtr, intPtr, int32, int64)) \56 macro(Z_ DFGOperation_D, functionType(int32, doubleType))51 macro(I_JITOperation_EJss, functionType(intPtr, intPtr, intPtr)) \ 52 macro(J_JITOperation_E, functionType(int64, intPtr)) \ 53 macro(P_JITOperation_EC, functionType(intPtr, intPtr, intPtr)) \ 54 macro(V_JITOperation_EOZD, functionType(voidType, intPtr, intPtr, int32, doubleType)) \ 55 macro(V_JITOperation_EOZJ, functionType(voidType, intPtr, intPtr, int32, int64)) \ 56 macro(Z_JITOperation_D, functionType(int32, doubleType)) 57 57 58 58 class IntrinsicRepository : public CommonValues { … … 80 80 81 81 #define FUNCTION_TYPE_RESOLVER(typeName, type) \ 82 LType operationType( DFG::typeName) \82 LType operationType(JSC::typeName) \ 83 83 { \ 84 84 return typeName(); \ -
trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp
r156482 r156490 1995 1995 // https://bugs.webkit.org/show_bug.cgi?id=113621 1996 1996 1997 J_ DFGOperation_E function =1997 J_JITOperation_E function = 1998 1998 m_node->op() == Call ? operationFTLCall : operationFTLConstruct; 1999 1999 -
trunk/Source/JavaScriptCore/ftl/FTLOSRExitCompiler.h
r156237 r156490 38 38 // jump to. 39 39 extern "C" { 40 void* DFG_OPERATION compileFTLOSRExit(ExecState*, unsigned exitID) WTF_INTERNAL;40 void* JIT_OPERATION compileFTLOSRExit(ExecState*, unsigned exitID) WTF_INTERNAL; 41 41 } 42 42 -
trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h
r156482 r156490 414 414 } 415 415 416 void writeBarrier(GPRReg owner, GPRReg scratch1, GPRReg scratch2, WriteBarrierUseKind useKind) 417 { 418 UNUSED_PARAM(owner); 419 UNUSED_PARAM(scratch1); 420 UNUSED_PARAM(scratch2); 421 UNUSED_PARAM(useKind); 422 ASSERT(owner != scratch1); 423 ASSERT(owner != scratch2); 424 ASSERT(scratch1 != scratch2); 425 426 #if ENABLE(WRITE_BARRIER_PROFILING) 427 emitCount(WriteBarrierCounters::jitCounterFor(useKind)); 428 #endif 429 } 430 416 431 Vector<BytecodeAndMachineOffset>& decodedCodeMapFor(CodeBlock*); 417 432 -
trunk/Source/JavaScriptCore/jit/JIT.cpp
r156376 r156490 798 798 || callLinkInfo->callType == CallLinkInfo::CallVarargs); 799 799 if (callLinkInfo->callType == CallLinkInfo::Call) { 800 repatchBuffer.relink(callLinkInfo->callReturnLocation, vm->getCTIStub( linkClosureCallGenerator).code());800 repatchBuffer.relink(callLinkInfo->callReturnLocation, vm->getCTIStub(oldStyleLinkClosureCallGenerator).code()); 801 801 return; 802 802 } 803 803 804 repatchBuffer.relink(callLinkInfo->callReturnLocation, vm->getCTIStub( virtualCallGenerator).code());804 repatchBuffer.relink(callLinkInfo->callReturnLocation, vm->getCTIStub(oldStyleVirtualCallGenerator).code()); 805 805 return; 806 806 } 807 807 808 808 ASSERT(kind == CodeForConstruct); 809 repatchBuffer.relink(callLinkInfo->callReturnLocation, vm->getCTIStub( virtualConstructGenerator).code());809 repatchBuffer.relink(callLinkInfo->callReturnLocation, vm->getCTIStub(oldStyleVirtualConstructGenerator).code()); 810 810 } 811 811 … … 814 814 RepatchBuffer repatchBuffer(callerCodeBlock); 815 815 816 repatchBuffer.relink(callLinkInfo->callReturnLocation, callerCodeBlock->vm()->getCTIStub( virtualCallGenerator).code());816 repatchBuffer.relink(callLinkInfo->callReturnLocation, callerCodeBlock->vm()->getCTIStub(oldStyleVirtualCallGenerator).code()); 817 817 } 818 818 -
trunk/Source/JavaScriptCore/jit/JITCall.cpp
r156482 r156490 147 147 148 148 emitGetFromCallFrameHeader64(JSStack::Callee, regT0); 149 emitNakedCall(m_vm->getCTIStub( virtualCallGenerator).code());149 emitNakedCall(m_vm->getCTIStub(oldStyleVirtualCallGenerator).code()); 150 150 151 151 sampleCodeBlock(m_codeBlock); … … 234 234 linkSlowCase(iter); 235 235 236 m_callStructureStubCompilationInfo[callLinkInfoIndex].callReturnLocation = emitNakedCall(opcodeID == op_construct ? m_vm->getCTIStub( linkConstructGenerator).code() : m_vm->getCTIStub(linkCallGenerator).code());236 m_callStructureStubCompilationInfo[callLinkInfoIndex].callReturnLocation = emitNakedCall(opcodeID == op_construct ? m_vm->getCTIStub(oldStyleLinkConstructGenerator).code() : m_vm->getCTIStub(oldStyleLinkCallGenerator).code()); 237 237 238 238 sampleCodeBlock(m_codeBlock); … … 264 264 patchBuffer.link(call, FunctionPtr(codePtr.executableAddress())); 265 265 patchBuffer.link(done, callLinkInfo->hotPathOther.labelAtOffset(0)); 266 patchBuffer.link(slow, CodeLocationLabel(m_vm->getCTIStub( virtualCallGenerator).code()));266 patchBuffer.link(slow, CodeLocationLabel(m_vm->getCTIStub(oldStyleVirtualCallGenerator).code())); 267 267 268 268 RefPtr<ClosureCallStubRoutine> stubRoutine = adoptRef(new ClosureCallStubRoutine( … … 282 282 RepatchBuffer::startOfBranchPtrWithPatchOnRegister(callLinkInfo->hotPathBegin), 283 283 CodeLocationLabel(stubRoutine->code().code())); 284 repatchBuffer.relink(callLinkInfo->callReturnLocation, m_vm->getCTIStub( virtualCallGenerator).code());284 repatchBuffer.relink(callLinkInfo->callReturnLocation, m_vm->getCTIStub(oldStyleVirtualCallGenerator).code()); 285 285 286 286 callLinkInfo->stub = stubRoutine.release(); -
trunk/Source/JavaScriptCore/jit/JITCall32_64.cpp
r156237 r156490 218 218 219 219 emitLoad(JSStack::Callee, regT1, regT0); 220 emitNakedCall(m_vm->getCTIStub( virtualCallGenerator).code());220 emitNakedCall(m_vm->getCTIStub(oldStyleVirtualCallGenerator).code()); 221 221 222 222 sampleCodeBlock(m_codeBlock); … … 307 307 linkSlowCase(iter); 308 308 309 m_callStructureStubCompilationInfo[callLinkInfoIndex].callReturnLocation = emitNakedCall(opcodeID == op_construct ? m_vm->getCTIStub( linkConstructGenerator).code() : m_vm->getCTIStub(linkCallGenerator).code());309 m_callStructureStubCompilationInfo[callLinkInfoIndex].callReturnLocation = emitNakedCall(opcodeID == op_construct ? m_vm->getCTIStub(oldStyleLinkConstructGenerator).code() : m_vm->getCTIStub(oldStyleLinkCallGenerator).code()); 310 310 311 311 sampleCodeBlock(m_codeBlock); … … 336 336 patchBuffer.link(call, FunctionPtr(codePtr.executableAddress())); 337 337 patchBuffer.link(done, callLinkInfo->hotPathOther.labelAtOffset(0)); 338 patchBuffer.link(slow, CodeLocationLabel(m_vm->getCTIStub( virtualCallGenerator).code()));338 patchBuffer.link(slow, CodeLocationLabel(m_vm->getCTIStub(oldStyleVirtualCallGenerator).code())); 339 339 340 340 RefPtr<ClosureCallStubRoutine> stubRoutine = adoptRef(new ClosureCallStubRoutine( … … 354 354 RepatchBuffer::startOfBranchPtrWithPatchOnRegister(callLinkInfo->hotPathBegin), 355 355 CodeLocationLabel(stubRoutine->code().code())); 356 repatchBuffer.relink(callLinkInfo->callReturnLocation, m_vm->getCTIStub( virtualCallGenerator).code());356 repatchBuffer.relink(callLinkInfo->callReturnLocation, m_vm->getCTIStub(oldStyleVirtualCallGenerator).code()); 357 357 358 358 callLinkInfo->stub = stubRoutine.release(); -
trunk/Source/JavaScriptCore/jit/JITOperationWrappers.h
r156236 r156490 27 27 #define JITOperationWrappers_h 28 28 29 #include "JITOperations.h" 29 30 #include <wtf/Compiler.h> 30 31 #include <wtf/InlineASM.h> 32 33 #if COMPILER(MSVC) 34 #include <intrin.h> 35 #endif 31 36 32 37 namespace JSC { … … 54 59 "jmp " LOCAL_REFERENCE(function##WithReturnAddress) "\n" \ 55 60 ); 56 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, rsi) 57 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, rcx) 58 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, rcx) 59 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, r8) 61 #define _P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, rsi) 62 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, rsi) 63 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, rcx) 64 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, rcx) 65 #define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, r8) 60 66 61 67 #elif COMPILER(GCC) && CPU(X86) … … 71 77 "jmp " LOCAL_REFERENCE(function##WithReturnAddress) "\n" \ 72 78 ); 73 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 8) 74 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 16) 75 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 20) 76 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 24) 79 #define _P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 8) 80 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 8) 81 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 16) 82 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 20) 83 #define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 24) 77 84 78 85 #elif COMPILER(GCC) && CPU(ARM_THUMB2) 79 86 80 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \87 #define _P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \ 81 88 asm ( \ 82 89 ".text" "\n" \ … … 91 98 ); 92 99 93 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) \ 100 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \ 101 _P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) 102 103 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) \ 94 104 asm ( \ 95 105 ".text" "\n" \ … … 114 124 #endif 115 125 116 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \126 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \ 117 127 asm ( \ 118 128 ".text" "\n" \ … … 127 137 ); 128 138 129 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \139 #define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \ 130 140 asm ( \ 131 141 ".text" "\n" \ … … 142 152 #elif COMPILER(GCC) && CPU(ARM_TRADITIONAL) 143 153 144 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \154 #define _P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \ 145 155 asm ( \ 146 156 ".text" "\n" \ … … 153 163 ); 154 164 155 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) \ 165 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \ 166 _P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) 167 168 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) \ 156 169 asm ( \ 157 170 ".text" "\n" \ … … 174 187 #endif 175 188 176 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \189 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \ 177 190 asm ( \ 178 191 ".text" "\n" \ … … 185 198 ); 186 199 187 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \200 #define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \ 188 201 asm ( \ 189 202 ".text" "\n" \ … … 198 211 #elif COMPILER(GCC) && CPU(MIPS) 199 212 200 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \213 #define _P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \ 201 214 asm( \ 202 215 ".text" "\n" \ … … 209 222 ); 210 223 211 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) \ 224 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \ 225 _P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) 226 227 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) \ 212 228 asm( \ 213 229 ".text" "\n" \ … … 220 236 ); 221 237 222 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \238 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \ 223 239 asm( \ 224 240 ".text" "\n" \ … … 231 247 ); 232 248 233 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \249 #define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \ 234 250 asm( \ 235 251 ".text" "\n" \ … … 246 262 #define SH4_SCRATCH_REGISTER "r11" 247 263 248 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \264 #define _P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \ 249 265 asm( \ 250 266 ".text" "\n" \ … … 257 273 ); 258 274 259 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) \ 275 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \ 276 _P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) 277 278 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) \ 260 279 asm( \ 261 280 ".text" "\n" \ … … 286 305 ); 287 306 288 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 0, SH4_SCRATCH_REGISTER) 289 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 4, SH4_SCRATCH_REGISTER) 307 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 0, SH4_SCRATCH_REGISTER) 308 #define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) FUNCTION_WRAPPER_WITH_RETURN_ADDRESS(function, 4, SH4_SCRATCH_REGISTER) 309 310 #elif COMPILER(MSVC) && CPU(X86) 311 312 #define _P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \ 313 void* JIT_OPERATION function(ExecState* exec) { return function##WithReturnAddress(exec, ReturnAddressPtr(*(void**)_AddressOfReturnAddress())); } 314 315 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \ 316 EncodedJSValue JIT_OPERATION function(ExecState* exec) { return function##WithReturnAddress(exec, ReturnAddressPtr(*(void**)_AddressOfReturnAddress())); } 317 318 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) \ 319 EncodedJSValue JIT_OPERATION function(ExecState* exec, JSCell* cell, StringImpl* string) { return function##WithReturnAddress(exec, cell, string, ReturnAddressPtr(*(void**)_AddressOfReturnAddress())); } 320 321 #define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \ 322 EncodedJSValue JIT_OPERATION function(ExecState* exec, EncodedJSValue value, StringImpl* string) { return function##WithReturnAddress(exec, value, string, ReturnAddressPtr(*(void**)_AddressOfReturnAddress())); } 323 324 #define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \ 325 void JIT_OPERATION function(ExecState* exec, EncodedJSValue value, JSCell* cell, StringImpl* string) { return function##WithReturnAddress(exec, value, cell, string, ReturnAddressPtr(*(void**)_AddressOfReturnAddress())); } 290 326 291 327 #endif … … 293 329 #define P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \ 294 330 void* JIT_OPERATION function##WithReturnAddress(ExecState*, ReturnAddressPtr) REFERENCED_FROM_ASM WTF_INTERNAL; \ 295 FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function)331 _P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) 296 332 297 333 #define J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \ 298 334 EncodedJSValue JIT_OPERATION function##WithReturnAddress(ExecState*, ReturnAddressPtr) REFERENCED_FROM_ASM WTF_INTERNAL; \ 299 FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function)335 _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) 300 336 301 337 #define J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) \ 302 338 EncodedJSValue JIT_OPERATION function##WithReturnAddress(ExecState*, JSCell*, StringImpl*, ReturnAddressPtr) REFERENCED_FROM_ASM WTF_INTERNAL; \ 303 FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function)339 _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) 304 340 305 341 #define J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \ 306 342 EncodedJSValue JIT_OPERATION function##WithReturnAddress(ExecState*, EncodedJSValue, StringImpl*, ReturnAddressPtr) REFERENCED_FROM_ASM WTF_INTERNAL; \ 307 FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function)343 _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) 308 344 309 345 #define V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \ 310 346 void JIT_OPERATION function##WithReturnAddress(ExecState*, EncodedJSValue, JSCell*, StringImpl*, ReturnAddressPtr) REFERENCED_FROM_ASM WTF_INTERNAL; \ 311 FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function)347 _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) 312 348 313 349 } // namespace JSC -
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r156236 r156490 588 588 } 589 589 590 JITHandlerEncoded JIT_OPERATION lookupExceptionHandler(ExecState* exec , uint32_t callIndex)590 JITHandlerEncoded JIT_OPERATION lookupExceptionHandler(ExecState* exec) 591 591 { 592 592 VM* vm = &exec->vm(); … … 596 596 ASSERT(exceptionValue); 597 597 598 unsigned vPCIndex = exec->codeBlock()->bytecodeOffsetForCallAtIndex(callIndex); 599 ExceptionHandler handler = genericUnwind(vm, exec, exceptionValue, vPCIndex); 598 ExceptionHandler handler = genericUnwind(vm, exec, exceptionValue); 600 599 ASSERT(handler.catchRoutine); 601 600 return dfgHandlerEncoded(handler.callFrame, handler.catchRoutine); 602 601 } 603 602 604 JITHandlerEncoded JIT_OPERATION lookupExceptionHandlerInStub(ExecState* exec, StructureStubInfo* stubInfo)605 {606 VM* vm = &exec->vm();607 NativeCallFrameTracer tracer(vm, exec);608 609 JSValue exceptionValue = exec->exception();610 ASSERT(exceptionValue);611 612 CodeOrigin codeOrigin = stubInfo->codeOrigin;613 while (codeOrigin.inlineCallFrame)614 codeOrigin = codeOrigin.inlineCallFrame->caller;615 616 ExceptionHandler handler = genericUnwind(vm, exec, exceptionValue, codeOrigin.bytecodeIndex);617 ASSERT(handler.catchRoutine);618 return dfgHandlerEncoded(handler.callFrame, handler.catchRoutine);619 }620 621 603 } // extern "C" 622 604 605 // Note: getHostCallReturnValueWithExecState() needs to be placed before the 606 // definition of getHostCallReturnValue() below because the Windows build 607 // requires it. 608 extern "C" EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValueWithExecState(ExecState* exec) 609 { 610 if (!exec) 611 return JSValue::encode(JSValue()); 612 return JSValue::encode(exec->vm().hostCallReturnValue); 613 } 614 615 #if COMPILER(GCC) && CPU(X86_64) 616 asm ( 617 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" 618 HIDE_SYMBOL(getHostCallReturnValue) "\n" 619 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 620 "mov 40(%r13), %r13\n" 621 "mov %r13, %rdi\n" 622 "jmp " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" 623 ); 624 625 #elif COMPILER(GCC) && CPU(X86) 626 asm ( 627 ".text" "\n" \ 628 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" 629 HIDE_SYMBOL(getHostCallReturnValue) "\n" 630 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 631 "mov 40(%edi), %edi\n" 632 "mov %edi, 4(%esp)\n" 633 "jmp " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" 634 ); 635 636 #elif COMPILER(GCC) && CPU(ARM_THUMB2) 637 asm ( 638 ".text" "\n" 639 ".align 2" "\n" 640 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" 641 HIDE_SYMBOL(getHostCallReturnValue) "\n" 642 ".thumb" "\n" 643 ".thumb_func " THUMB_FUNC_PARAM(getHostCallReturnValue) "\n" 644 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 645 "ldr r5, [r5, #40]" "\n" 646 "mov r0, r5" "\n" 647 "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" 648 ); 649 650 #elif COMPILER(GCC) && CPU(ARM_TRADITIONAL) 651 asm ( 652 ".text" "\n" 653 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" 654 HIDE_SYMBOL(getHostCallReturnValue) "\n" 655 INLINE_ARM_FUNCTION(getHostCallReturnValue) 656 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 657 "ldr r5, [r5, #40]" "\n" 658 "mov r0, r5" "\n" 659 "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" 660 ); 661 662 #elif COMPILER(GCC) && CPU(MIPS) 663 asm ( 664 ".text" "\n" 665 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" 666 HIDE_SYMBOL(getHostCallReturnValue) "\n" 667 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 668 LOAD_FUNCTION_TO_T9(getHostCallReturnValueWithExecState) 669 "lw $s0, 40($s0)" "\n" 670 "move $a0, $s0" "\n" 671 "b " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "\n" 672 ); 673 674 #elif COMPILER(GCC) && CPU(SH4) 675 asm ( 676 ".text" "\n" 677 ".globl " SYMBOL_STRING(getHostCallReturnValue) "\n" 678 HIDE_SYMBOL(getHostCallReturnValue) "\n" 679 SYMBOL_STRING(getHostCallReturnValue) ":" "\n" 680 "add #40, r14" "\n" 681 "mov.l @r14, r14" "\n" 682 "mov r14, r4" "\n" 683 "mov.l 2f, " SH4_SCRATCH_REGISTER "\n" 684 "braf " SH4_SCRATCH_REGISTER "\n" 685 "nop" "\n" 686 "1: .balign 4" "\n" 687 "2: .long " LOCAL_REFERENCE(getHostCallReturnValueWithExecState) "-1b\n" 688 ); 689 690 #elif COMPILER(MSVC) && CPU(X86) 691 extern "C" { 692 __declspec(naked) EncodedJSValue HOST_CALL_RETURN_VALUE_OPTION getHostCallReturnValue() 693 { 694 __asm { 695 mov edi, [edi + 40]; 696 mov [esp + 4], edi; 697 jmp getHostCallReturnValueWithExecState 698 } 699 } 700 } 701 #endif 702 623 703 } // namespace JSC 624 704 -
trunk/Source/JavaScriptCore/jit/JITOperations.h
r156236 r156490 171 171 } 172 172 #endif 173 JITHandlerEncoded JIT_OPERATION lookupExceptionHandler(ExecState*, uint32_t) WTF_INTERNAL; 174 JITHandlerEncoded JIT_OPERATION lookupExceptionHandlerInStub(ExecState*, StructureStubInfo*) WTF_INTERNAL; 173 JITHandlerEncoded JIT_OPERATION lookupExceptionHandler(ExecState*) WTF_INTERNAL; 175 174 176 175 EncodedJSValue JIT_OPERATION operationGetById(ExecState*, EncodedJSValue, StringImpl*) WTF_INTERNAL; -
trunk/Source/JavaScriptCore/jit/Repatch.cpp
r156236 r156490 514 514 success = stubJit.emitExceptionCheck(CCallHelpers::InvertedExceptionCheck); 515 515 516 stubJit.setupArgumentsWithExecState( 517 MacroAssembler::TrustedImmPtr(&stubInfo)); 516 stubJit.setupArgumentsExecState(); 518 517 handlerCall = stubJit.call(); 519 518 stubJit.jump(GPRInfo::returnValueGPR2); … … 550 549 if (!isDirect) { 551 550 patchBuffer.link(operationCall, operationFunction); 552 patchBuffer.link(handlerCall, lookupExceptionHandler InStub);551 patchBuffer.link(handlerCall, lookupExceptionHandler); 553 552 } 554 553 -
trunk/Source/JavaScriptCore/jit/ThunkGenerators.cpp
r156237 r156490 28 28 29 29 #include "CodeBlock.h" 30 #include "JITOperations.h" 30 31 #include "JSStack.h" 31 32 #include "Operations.h" … … 39 40 namespace JSC { 40 41 41 static JSInterfaceJIT::Call generateSlowCaseFor(VM* vm, JSInterfaceJIT& jit)42 static JSInterfaceJIT::Call oldStyleGenerateSlowCaseFor(VM* vm, JSInterfaceJIT& jit) 42 43 { 43 44 jit.emitGetFromCallFrameHeaderPtr(JSStack::CallerFrame, JSInterfaceJIT::regT2); … … 60 61 } 61 62 62 static MacroAssemblerCodeRef linkForGenerator(VM* vm, FunctionPtr lazyLink, FunctionPtr notJSFunction, const char* name)63 static MacroAssemblerCodeRef oldStyleLinkForGenerator(VM* vm, FunctionPtr lazyLink, FunctionPtr notJSFunction, const char* name) 63 64 { 64 65 JSInterfaceJIT jit(vm); … … 89 90 90 91 slowCase.link(&jit); 91 JSInterfaceJIT::Call callNotJSFunction = generateSlowCaseFor(vm, jit);92 JSInterfaceJIT::Call callNotJSFunction = oldStyleGenerateSlowCaseFor(vm, jit); 92 93 93 94 LinkBuffer patchBuffer(*vm, &jit, GLOBAL_THUNK_ID); … … 98 99 } 99 100 100 MacroAssemblerCodeRef linkCallGenerator(VM* vm)101 { 102 return linkForGenerator(vm, FunctionPtr(cti_vm_lazyLinkCall), FunctionPtr(cti_op_call_NotJSFunction), "call");103 } 104 105 MacroAssemblerCodeRef linkConstructGenerator(VM* vm)106 { 107 return linkForGenerator(vm, FunctionPtr(cti_vm_lazyLinkConstruct), FunctionPtr(cti_op_construct_NotJSConstruct), "construct");108 } 109 110 MacroAssemblerCodeRef linkClosureCallGenerator(VM* vm)111 { 112 return linkForGenerator(vm, FunctionPtr(cti_vm_lazyLinkClosureCall), FunctionPtr(cti_op_call_NotJSFunction), "closure call");113 } 114 115 static MacroAssemblerCodeRef virtualForGenerator(VM* vm, FunctionPtr compile, FunctionPtr notJSFunction, const char* name, CodeSpecializationKind kind)101 MacroAssemblerCodeRef oldStyleLinkCallGenerator(VM* vm) 102 { 103 return oldStyleLinkForGenerator(vm, FunctionPtr(cti_vm_lazyLinkCall), FunctionPtr(cti_op_call_NotJSFunction), "call"); 104 } 105 106 MacroAssemblerCodeRef oldStyleLinkConstructGenerator(VM* vm) 107 { 108 return oldStyleLinkForGenerator(vm, FunctionPtr(cti_vm_lazyLinkConstruct), FunctionPtr(cti_op_construct_NotJSConstruct), "construct"); 109 } 110 111 MacroAssemblerCodeRef oldStyleLinkClosureCallGenerator(VM* vm) 112 { 113 return oldStyleLinkForGenerator(vm, FunctionPtr(cti_vm_lazyLinkClosureCall), FunctionPtr(cti_op_call_NotJSFunction), "closure call"); 114 } 115 116 static MacroAssemblerCodeRef oldStyleVirtualForGenerator(VM* vm, FunctionPtr compile, FunctionPtr notJSFunction, const char* name, CodeSpecializationKind kind) 116 117 { 117 118 JSInterfaceJIT jit(vm); … … 149 150 150 151 slowCase.link(&jit); 151 JSInterfaceJIT::Call callNotJSFunction = generateSlowCaseFor(vm, jit);152 JSInterfaceJIT::Call callNotJSFunction = oldStyleGenerateSlowCaseFor(vm, jit); 152 153 153 154 LinkBuffer patchBuffer(*vm, &jit, GLOBAL_THUNK_ID); … … 158 159 } 159 160 160 MacroAssemblerCodeRef virtualCallGenerator(VM* vm) 161 { 162 return virtualForGenerator(vm, FunctionPtr(cti_op_call_jitCompile), FunctionPtr(cti_op_call_NotJSFunction), "call", CodeForCall); 163 } 164 165 MacroAssemblerCodeRef virtualConstructGenerator(VM* vm) 166 { 167 return virtualForGenerator(vm, FunctionPtr(cti_op_construct_jitCompile), FunctionPtr(cti_op_construct_NotJSConstruct), "construct", CodeForConstruct); 161 MacroAssemblerCodeRef oldStyleVirtualCallGenerator(VM* vm) 162 { 163 return oldStyleVirtualForGenerator(vm, FunctionPtr(cti_op_call_jitCompile), FunctionPtr(cti_op_call_NotJSFunction), "call", CodeForCall); 164 } 165 166 MacroAssemblerCodeRef oldStyleVirtualConstructGenerator(VM* vm) 167 { 168 return oldStyleVirtualForGenerator(vm, FunctionPtr(cti_op_construct_jitCompile), FunctionPtr(cti_op_construct_NotJSConstruct), "construct", CodeForConstruct); 169 } 170 171 inline void emitPointerValidation(CCallHelpers& jit, GPRReg pointerGPR) 172 { 173 #if !ASSERT_DISABLED 174 CCallHelpers::Jump isNonZero = jit.branchTestPtr(CCallHelpers::NonZero, pointerGPR); 175 jit.breakpoint(); 176 isNonZero.link(&jit); 177 jit.push(pointerGPR); 178 jit.load8(pointerGPR, pointerGPR); 179 jit.pop(pointerGPR); 180 #else 181 UNUSED_PARAM(jit); 182 UNUSED_PARAM(pointerGPR); 183 #endif 184 } 185 186 MacroAssemblerCodeRef throwExceptionFromCallSlowPathGenerator(VM* vm) 187 { 188 CCallHelpers jit(vm); 189 190 // We will jump to here if the JIT code thinks it's making a call, but the 191 // linking helper (C++ code) decided to throw an exception instead. We will 192 // have saved the callReturnIndex in the first arguments of JITStackFrame. 193 // Note that the return address will be on the stack at this point, so we 194 // need to remove it and drop it on the floor, since we don't care about it. 195 // Finally note that the call frame register points at the callee frame, so 196 // we need to pop it. 197 jit.preserveReturnAddressAfterCall(GPRInfo::nonPreservedNonReturnGPR); 198 jit.loadPtr( 199 CCallHelpers::Address( 200 GPRInfo::callFrameRegister, 201 static_cast<ptrdiff_t>(sizeof(Register)) * JSStack::CallerFrame), 202 GPRInfo::callFrameRegister); 203 #if USE(JSVALUE64) 204 jit.peek64(GPRInfo::nonPreservedNonReturnGPR, JITSTACKFRAME_ARGS_INDEX); 205 #else 206 jit.peek(GPRInfo::nonPreservedNonReturnGPR, JITSTACKFRAME_ARGS_INDEX); 207 #endif 208 jit.setupArgumentsWithExecState(GPRInfo::nonPreservedNonReturnGPR); 209 jit.move(CCallHelpers::TrustedImmPtr(bitwise_cast<void*>(lookupExceptionHandler)), GPRInfo::nonArgGPR0); 210 emitPointerValidation(jit, GPRInfo::nonArgGPR0); 211 jit.call(GPRInfo::nonArgGPR0); 212 emitPointerValidation(jit, GPRInfo::returnValueGPR2); 213 jit.jump(GPRInfo::returnValueGPR2); 214 215 LinkBuffer patchBuffer(*vm, &jit, GLOBAL_THUNK_ID); 216 return FINALIZE_CODE(patchBuffer, ("Throw exception from call slow path thunk")); 217 } 218 219 static void slowPathFor( 220 CCallHelpers& jit, VM* vm, P_JITOperation_E slowPathFunction) 221 { 222 jit.preserveReturnAddressAfterCall(GPRInfo::nonArgGPR2); 223 emitPointerValidation(jit, GPRInfo::nonArgGPR2); 224 jit.storePtr( 225 GPRInfo::nonArgGPR2, 226 CCallHelpers::Address( 227 GPRInfo::callFrameRegister, 228 static_cast<ptrdiff_t>(sizeof(Register)) * JSStack::ReturnPC)); 229 jit.storePtr(GPRInfo::callFrameRegister, &vm->topCallFrame); 230 #if USE(JSVALUE64) 231 jit.poke64(GPRInfo::nonPreservedNonReturnGPR, JITSTACKFRAME_ARGS_INDEX); 232 #else 233 jit.poke(GPRInfo::nonPreservedNonReturnGPR, JITSTACKFRAME_ARGS_INDEX); 234 #endif 235 jit.setupArgumentsExecState(); 236 jit.move(CCallHelpers::TrustedImmPtr(bitwise_cast<void*>(slowPathFunction)), GPRInfo::nonArgGPR0); 237 emitPointerValidation(jit, GPRInfo::nonArgGPR0); 238 jit.call(GPRInfo::nonArgGPR0); 239 240 // This slow call will return the address of one of the following: 241 // 1) Exception throwing thunk. 242 // 2) Host call return value returner thingy. 243 // 3) The function to call. 244 jit.loadPtr( 245 CCallHelpers::Address( 246 GPRInfo::callFrameRegister, 247 static_cast<ptrdiff_t>(sizeof(Register)) * JSStack::ReturnPC), 248 GPRInfo::nonPreservedNonReturnGPR); 249 jit.storePtr( 250 CCallHelpers::TrustedImmPtr(0), 251 CCallHelpers::Address( 252 GPRInfo::callFrameRegister, 253 static_cast<ptrdiff_t>(sizeof(Register)) * JSStack::ReturnPC)); 254 emitPointerValidation(jit, GPRInfo::nonPreservedNonReturnGPR); 255 jit.restoreReturnAddressBeforeReturn(GPRInfo::nonPreservedNonReturnGPR); 256 emitPointerValidation(jit, GPRInfo::returnValueGPR); 257 jit.jump(GPRInfo::returnValueGPR); 258 } 259 260 static MacroAssemblerCodeRef linkForThunkGenerator( 261 VM* vm, CodeSpecializationKind kind) 262 { 263 // The return address is on the stack or in the link register. We will hence 264 // save the return address to the call frame while we make a C++ function call 265 // to perform linking and lazy compilation if necessary. We expect the callee 266 // to be in nonArgGPR0/nonArgGPR1 (payload/tag), the call frame to have already 267 // been adjusted, nonPreservedNonReturnGPR holds the exception handler index, 268 // and all other registers to be available for use. We use JITStackFrame::args 269 // to save important information across calls. 270 271 CCallHelpers jit(vm); 272 273 slowPathFor(jit, vm, kind == CodeForCall ? operationLinkCall : operationLinkConstruct); 274 275 LinkBuffer patchBuffer(*vm, &jit, GLOBAL_THUNK_ID); 276 return FINALIZE_CODE( 277 patchBuffer, 278 ("Link %s slow path thunk", kind == CodeForCall ? "call" : "construct")); 279 } 280 281 MacroAssemblerCodeRef linkCallThunkGenerator(VM* vm) 282 { 283 return linkForThunkGenerator(vm, CodeForCall); 284 } 285 286 MacroAssemblerCodeRef linkConstructThunkGenerator(VM* vm) 287 { 288 return linkForThunkGenerator(vm, CodeForConstruct); 289 } 290 291 // For closure optimizations, we only include calls, since if you're using closures for 292 // object construction then you're going to lose big time anyway. 293 MacroAssemblerCodeRef linkClosureCallThunkGenerator(VM* vm) 294 { 295 CCallHelpers jit(vm); 296 297 slowPathFor(jit, vm, operationLinkClosureCall); 298 299 LinkBuffer patchBuffer(*vm, &jit, GLOBAL_THUNK_ID); 300 return FINALIZE_CODE(patchBuffer, ("Link closure call slow path thunk")); 301 } 302 303 static MacroAssemblerCodeRef virtualForThunkGenerator( 304 VM* vm, CodeSpecializationKind kind) 305 { 306 // The return address is on the stack, or in the link register. We will hence 307 // jump to the callee, or save the return address to the call frame while we 308 // make a C++ function call to the appropriate JIT operation. 309 310 CCallHelpers jit(vm); 311 312 CCallHelpers::JumpList slowCase; 313 314 // FIXME: we should have a story for eliminating these checks. In many cases, 315 // the DFG knows that the value is definitely a cell, or definitely a function. 316 317 #if USE(JSVALUE64) 318 slowCase.append( 319 jit.branchTest64( 320 CCallHelpers::NonZero, GPRInfo::nonArgGPR0, GPRInfo::tagMaskRegister)); 321 #else 322 slowCase.append( 323 jit.branch32( 324 CCallHelpers::NotEqual, GPRInfo::nonArgGPR1, 325 CCallHelpers::TrustedImm32(JSValue::CellTag))); 326 #endif 327 jit.loadPtr(CCallHelpers::Address(GPRInfo::nonArgGPR0, JSCell::structureOffset()), GPRInfo::nonArgGPR2); 328 slowCase.append( 329 jit.branchPtr( 330 CCallHelpers::NotEqual, 331 CCallHelpers::Address(GPRInfo::nonArgGPR2, Structure::classInfoOffset()), 332 CCallHelpers::TrustedImmPtr(JSFunction::info()))); 333 334 // Now we know we have a JSFunction. 335 336 jit.loadPtr( 337 CCallHelpers::Address(GPRInfo::nonArgGPR0, JSFunction::offsetOfExecutable()), 338 GPRInfo::nonArgGPR2); 339 slowCase.append( 340 jit.branch32( 341 CCallHelpers::LessThan, 342 CCallHelpers::Address( 343 GPRInfo::nonArgGPR2, ExecutableBase::offsetOfNumParametersFor(kind)), 344 CCallHelpers::TrustedImm32(0))); 345 346 // Now we know that we have a CodeBlock, and we're committed to making a fast 347 // call. 348 349 jit.loadPtr( 350 CCallHelpers::Address(GPRInfo::nonArgGPR0, JSFunction::offsetOfScopeChain()), 351 GPRInfo::nonArgGPR1); 352 #if USE(JSVALUE64) 353 jit.store64( 354 GPRInfo::nonArgGPR1, 355 CCallHelpers::Address( 356 GPRInfo::callFrameRegister, 357 static_cast<ptrdiff_t>(sizeof(Register)) * JSStack::ScopeChain)); 358 #else 359 jit.storePtr( 360 GPRInfo::nonArgGPR1, 361 CCallHelpers::Address( 362 GPRInfo::callFrameRegister, 363 static_cast<ptrdiff_t>(sizeof(Register)) * JSStack::ScopeChain + 364 OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.payload))); 365 jit.store32( 366 CCallHelpers::TrustedImm32(JSValue::CellTag), 367 CCallHelpers::Address( 368 GPRInfo::callFrameRegister, 369 static_cast<ptrdiff_t>(sizeof(Register)) * JSStack::ScopeChain + 370 OBJECT_OFFSETOF(EncodedValueDescriptor, asBits.tag))); 371 #endif 372 373 jit.loadPtr( 374 CCallHelpers::Address(GPRInfo::nonArgGPR2, ExecutableBase::offsetOfJITCodeWithArityCheckFor(kind)), 375 GPRInfo::regT0); 376 377 // Make a tail call. This will return back to JIT code. 378 emitPointerValidation(jit, GPRInfo::regT0); 379 jit.jump(GPRInfo::regT0); 380 381 slowCase.link(&jit); 382 383 // Here we don't know anything, so revert to the full slow path. 384 385 slowPathFor(jit, vm, kind == CodeForCall ? operationVirtualCall : operationVirtualConstruct); 386 387 LinkBuffer patchBuffer(*vm, &jit, GLOBAL_THUNK_ID); 388 return FINALIZE_CODE( 389 patchBuffer, 390 ("Virtual %s slow path thunk", kind == CodeForCall ? "call" : "construct")); 391 } 392 393 MacroAssemblerCodeRef virtualCallThunkGenerator(VM* vm) 394 { 395 return virtualForThunkGenerator(vm, CodeForCall); 396 } 397 398 MacroAssemblerCodeRef virtualConstructThunkGenerator(VM* vm) 399 { 400 return virtualForThunkGenerator(vm, CodeForConstruct); 168 401 } 169 402 -
trunk/Source/JavaScriptCore/jit/ThunkGenerators.h
r156237 r156490 32 32 namespace JSC { 33 33 34 MacroAssemblerCodeRef linkCallGenerator(VM*); 35 MacroAssemblerCodeRef linkConstructGenerator(VM*); 36 MacroAssemblerCodeRef linkClosureCallGenerator(VM*); 37 MacroAssemblerCodeRef virtualCallGenerator(VM*); 38 MacroAssemblerCodeRef virtualConstructGenerator(VM*); 34 MacroAssemblerCodeRef oldStyleLinkCallGenerator(VM*); 35 MacroAssemblerCodeRef oldStyleLinkConstructGenerator(VM*); 36 MacroAssemblerCodeRef oldStyleLinkClosureCallGenerator(VM*); 37 MacroAssemblerCodeRef oldStyleVirtualCallGenerator(VM*); 38 MacroAssemblerCodeRef oldStyleVirtualConstructGenerator(VM*); 39 40 MacroAssemblerCodeRef throwExceptionFromCallSlowPathGenerator(VM*); 41 42 MacroAssemblerCodeRef linkCallThunkGenerator(VM*); 43 MacroAssemblerCodeRef linkConstructThunkGenerator(VM*); 44 45 MacroAssemblerCodeRef linkClosureCallThunkGenerator(VM*); 46 47 MacroAssemblerCodeRef virtualCallThunkGenerator(VM*); 48 MacroAssemblerCodeRef virtualConstructThunkGenerator(VM*); 49 39 50 MacroAssemblerCodeRef stringLengthTrampolineGenerator(VM*); 40 51 MacroAssemblerCodeRef nativeCallGenerator(VM*);
Note: See TracChangeset
for help on using the changeset viewer.