Changeset 156490 in webkit


Ignore:
Timestamp:
Sep 26, 2013 1:27:14 PM (11 years ago)
Author:
mark.lam@apple.com
Message:

Move DFG inline caching logic into jit/.
https://bugs.webkit.org/show_bug.cgi?id=121749.

Reviewed by Geoffrey Garen.

Relanding http://trac.webkit.org/changeset/156235 after rebasing to latest
revision and fixing build breakages on Windows.

  • CMakeLists.txt:
  • GNUmakefile.list.am:
  • JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • Target.pri:
  • bytecode/CallLinkInfo.cpp:

(JSC::CallLinkInfo::unlink):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::resetStubInternal):

  • bytecode/StructureStubInfo.h:
  • dfg/DFGCallArrayAllocatorSlowPathGenerator.h:

(JSC::DFG::CallArrayAllocatorSlowPathGenerator::CallArrayAllocatorSlowPathGenerator):
(JSC::DFG::CallArrayAllocatorWithVariableSizeSlowPathGenerator::CallArrayAllocatorWithVariableSizeSlowPathGenerator):

  • dfg/DFGJITCompiler.h:
  • dfg/DFGOSRExitCompiler.h:
  • dfg/DFGOperations.cpp:

(JSC::DFG::operationPutByValInternal):

  • dfg/DFGOperations.h:

(JSC::DFG::operationNewTypedArrayWithSizeForType):
(JSC::DFG::operationNewTypedArrayWithOneArgumentForType):

  • dfg/DFGRegisterSet.h: Removed.
  • dfg/DFGRepatch.cpp: Removed.
  • dfg/DFGRepatch.h: Removed.
  • dfg/DFGScratchRegisterAllocator.h: Removed.
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::nonSpeculativeCompare):
(JSC::DFG::SpeculativeJIT::compilePeepHoleBranch):
(JSC::DFG::SpeculativeJIT::compare):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::cachedPutById):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
(JSC::DFG::CompareAndBoxBooleanSlowPathGenerator::CompareAndBoxBooleanSlowPathGenerator):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::cachedPutById):
(JSC::DFG::SpeculativeJIT::nonSpeculativePeepholeBranch):
(JSC::DFG::CompareAndBoxBooleanSlowPathGenerator::CompareAndBoxBooleanSlowPathGenerator):
(JSC::DFG::SpeculativeJIT::nonSpeculativeNonPeepholeCompare):
(JSC::DFG::SpeculativeJIT::compile):

  • dfg/DFGThunks.cpp:
  • dfg/DFGThunks.h:
  • ftl/FTLIntrinsicRepository.h:
  • ftl/FTLLowerDFGToLLVM.cpp:

(JSC::FTL::LowerDFGToLLVM::compileCallOrConstruct):

  • ftl/FTLOSRExitCompiler.h:
  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::writeBarrier):

  • jit/JIT.cpp:

(JSC::JIT::linkFor):
(JSC::JIT::linkSlowCall):

  • jit/JITCall.cpp:

(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCallSlowCase):
(JSC::JIT::privateCompileClosureCall):

  • jit/JITCall32_64.cpp:

(JSC::JIT::compileCallEvalSlowCase):
(JSC::JIT::compileOpCallSlowCase):
(JSC::JIT::privateCompileClosureCall):

  • jit/JITOperationWrappers.h: Copied from Source/JavaScriptCore/jit/JITOperationWrappers.h.
  • jit/JITOperations.cpp: Copied from Source/JavaScriptCore/jit/JITOperations.cpp.

(JSC::getHostCallReturnValueWithExecState):

  • jit/JITOperations.h: Copied from Source/JavaScriptCore/jit/JITOperations.h.
  • jit/RegisterSet.h: Copied from Source/JavaScriptCore/jit/RegisterSet.h.
  • jit/Repatch.cpp: Copied from Source/JavaScriptCore/jit/Repatch.cpp.

(JSC::tryBuildGetByIDList):

  • jit/Repatch.h: Copied from Source/JavaScriptCore/jit/Repatch.h.
  • jit/ScratchRegisterAllocator.h: Copied from Source/JavaScriptCore/jit/ScratchRegisterAllocator.h.
  • jit/ThunkGenerators.cpp:

(JSC::oldStyleGenerateSlowCaseFor):
(JSC::oldStyleLinkForGenerator):
(JSC::oldStyleLinkCallGenerator):
(JSC::oldStyleLinkConstructGenerator):
(JSC::oldStyleLinkClosureCallGenerator):
(JSC::oldStyleVirtualForGenerator):
(JSC::oldStyleVirtualCallGenerator):
(JSC::oldStyleVirtualConstructGenerator):
(JSC::emitPointerValidation):
(JSC::throwExceptionFromCallSlowPathGenerator):
(JSC::slowPathFor):
(JSC::linkForThunkGenerator):
(JSC::linkCallThunkGenerator):
(JSC::linkConstructThunkGenerator):
(JSC::linkClosureCallThunkGenerator):
(JSC::virtualForThunkGenerator):
(JSC::virtualCallThunkGenerator):
(JSC::virtualConstructThunkGenerator):

  • jit/ThunkGenerators.h:
Location:
trunk/Source/JavaScriptCore
Files:
4 deleted
29 edited
7 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/CMakeLists.txt

    r156300 r156490  
    151151    dfg/DFGPredictionInjectionPhase.cpp
    152152    dfg/DFGPredictionPropagationPhase.cpp
    153     dfg/DFGRepatch.cpp
    154153    dfg/DFGSSAConversionPhase.cpp
    155154    dfg/DFGSpeculativeJIT.cpp
     
    226225    jit/JITOpcodes.cpp
    227226    jit/JITOpcodes32_64.cpp
     227    jit/JITOperations.cpp
    228228    jit/JITPropertyAccess.cpp
    229229    jit/JITPropertyAccess32_64.cpp
     
    233233    jit/JITToDFGDeferredCompilationCallback.cpp
    234234    jit/JumpReplacementWatchpoint.cpp
     235    jit/Repatch.cpp
    235236    jit/ThunkGenerators.cpp
    236237
  • trunk/Source/JavaScriptCore/ChangeLog

    r156489 r156490  
     12013-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
    11022013-09-26  Anders Carlsson  <andersca@apple.com>
    2103
  • trunk/Source/JavaScriptCore/GNUmakefile.list.am

    r156489 r156490  
    340340        Source/JavaScriptCore/dfg/DFGPredictionPropagationPhase.h \
    341341        Source/JavaScriptCore/dfg/DFGRegisterBank.h \
    342         Source/JavaScriptCore/dfg/DFGRegisterSet.h \
    343         Source/JavaScriptCore/dfg/DFGRepatch.cpp \
    344         Source/JavaScriptCore/dfg/DFGRepatch.h \
    345342        Source/JavaScriptCore/dfg/DFGSafeToExecute.h \
    346343        Source/JavaScriptCore/dfg/DFGSaneStringGetByValSlowPathGenerator.h \
    347344        Source/JavaScriptCore/dfg/DFGScoreBoard.h \
    348         Source/JavaScriptCore/dfg/DFGScratchRegisterAllocator.h \
    349345        Source/JavaScriptCore/dfg/DFGSilentRegisterSavePlan.h \
    350346        Source/JavaScriptCore/dfg/DFGSlowPathGenerator.h \
     
    632628        Source/JavaScriptCore/jit/JITOpcodes32_64.cpp \
    633629        Source/JavaScriptCore/jit/JITOpcodes.cpp \
     630        Source/JavaScriptCore/jit/JITOperationWrappers.h \
     631        Source/JavaScriptCore/jit/JITOperations.cpp \
     632        Source/JavaScriptCore/jit/JITOperations.h \
    634633        Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp \
    635634        Source/JavaScriptCore/jit/JITPropertyAccess.cpp \
     
    654653        Source/JavaScriptCore/jit/JumpReplacementWatchpoint.cpp \
    655654        Source/JavaScriptCore/jit/JumpReplacementWatchpoint.h \
     655        Source/JavaScriptCore/jit/Repatch.cpp \
     656        Source/JavaScriptCore/jit/Repatch.h \
     657        Source/JavaScriptCore/jit/ScratchRegisterAllocator.h \
    656658        Source/JavaScriptCore/jit/SlowPathCall.h \
    657659        Source/JavaScriptCore/jit/SpecializedThunkJIT.h \
  • trunk/Source/JavaScriptCore/JavaScriptCore.vcxproj/JavaScriptCore.vcxproj

    r156489 r156490  
    379379    <ClCompile Include="..\jit\JITOpcodes.cpp" />
    380380    <ClCompile Include="..\jit\JITOpcodes32_64.cpp" />
     381    <ClCompile Include="..\jit\JITOperations.cpp" />
    381382    <ClCompile Include="..\jit\JITPropertyAccess.cpp" />
    382383    <ClCompile Include="..\jit\JITPropertyAccess32_64.cpp" />
     
    386387    <ClCompile Include="..\jit\JITToDFGDeferredCompilationCallback.cpp" />
    387388    <ClCompile Include="..\jit\JumpReplacementWatchpoint.cpp" />
     389    <ClCompile Include="..\jit\Repatch.cpp" />
    388390    <ClCompile Include="..\jit\ThunkGenerators.cpp" />
    389391    <ClCompile Include="..\llint\LLIntCLoop.cpp" />
     
    769771    <ClInclude Include="..\jit\JITExceptions.h" />
    770772    <ClInclude Include="..\jit\JITInlines.h" />
     773    <ClInclude Include="..\jit\JITOperationWrappers.h" />
     774    <ClInclude Include="..\jit\JITOperations.h" />
    771775    <ClInclude Include="..\jit\JITStubCall.h" />
    772776    <ClInclude Include="..\jit\JITStubRoutine.h" />
     
    780784    <ClInclude Include="..\jit\JSInterfaceJIT.h" />
    781785    <ClInclude Include="..\jit\JumpReplacementWatchpoint.h" />
     786    <ClInclude Include="..\jit\RegisterSet.h" />
     787    <ClInclude Include="..\jit\Repatch.h" />
     788    <ClInclude Include="..\jit\ScratchRegisterAllocator.h" />
    782789    <ClInclude Include="..\jit\SpecializedThunkJIT.h" />
    783790    <ClInclude Include="..\jit\ThunkGenerator.h" />
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r156489 r156490  
    121121                0F24E55517F0B71C00ABB217 /* InlineCallFrameSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F24E55317F0B71C00ABB217 /* InlineCallFrameSet.cpp */; };
    122122                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 */; };
    123130                0F256C361627B0AD007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F256C341627B0AA007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h */; settings = {ATTRIBUTES = (Private, ); }; };
    124131                0F2B66AC17B6B53F00A7AE3F /* GCIncomingRefCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F2B66A817B6B53D00A7AE3F /* GCIncomingRefCounted.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    267274                0F766D3815AE4A1C008F363E /* StructureStubClearingWatchpoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F766D3615AE4A1A008F363E /* StructureStubClearingWatchpoint.cpp */; };
    268275                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, ); }; };
    271276                0F7700921402FF3C0078EB39 /* SamplingCounter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F7700911402FF280078EB39 /* SamplingCounter.cpp */; };
    272277                0F7B294B14C3CD2F007C3DB1 /* DFGCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 0FD82E1F14172C2F00179C94 /* DFGCapabilities.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    731736                86B5826714D2796C00A9C306 /* CodeProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86B5822E14D2373B00A9C306 /* CodeProfile.cpp */; };
    732737                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, ); }; };
    735738                86C36EEA0EE1289D00B3DF59 /* MacroAssembler.h in Headers */ = {isa = PBXBuildFile; fileRef = 86C36EE90EE1289D00B3DF59 /* MacroAssembler.h */; settings = {ATTRIBUTES = (Private, ); }; };
    736739                86C568E011A213EE0007F7F0 /* MacroAssemblerARM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 86C568DD11A213EE0007F7F0 /* MacroAssemblerARM.cpp */; };
     
    13221325                0F24E55317F0B71C00ABB217 /* InlineCallFrameSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InlineCallFrameSet.cpp; sourceTree = "<group>"; };
    13231326                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>"; };
    13241334                0F256C341627B0AA007F2783 /* DFGCallArrayAllocatorSlowPathGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DFGCallArrayAllocatorSlowPathGenerator.h; path = dfg/DFGCallArrayAllocatorSlowPathGenerator.h; sourceTree = "<group>"; };
    13251335                0F2B66A817B6B53D00A7AE3F /* GCIncomingRefCounted.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GCIncomingRefCounted.h; sourceTree = "<group>"; };
     
    14671477                0F766D3615AE4A1A008F363E /* StructureStubClearingWatchpoint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StructureStubClearingWatchpoint.cpp; sourceTree = "<group>"; };
    14681478                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>"; };
    14711479                0F77008E1402FDD60078EB39 /* SamplingCounter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SamplingCounter.h; sourceTree = "<group>"; };
    14721480                0F7700911402FF280078EB39 /* SamplingCounter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SamplingCounter.cpp; sourceTree = "<group>"; };
     
    19261934                86B5822F14D2373B00A9C306 /* CodeProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CodeProfile.h; sourceTree = "<group>"; };
    19271935                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>"; };
    19301936                86BF642A148DB2B5004DE36A /* Intrinsic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Intrinsic.h; sourceTree = "<group>"; };
    19311937                86C36EE90EE1289D00B3DF59 /* MacroAssembler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacroAssembler.h; sourceTree = "<group>"; };
     
    27102716                                0F24E53C17EA9F5900ABB217 /* AssemblyHelpers.h */,
    27112717                                0F24E53D17EA9F5900ABB217 /* CCallHelpers.h */,
    2712                                 0F24E53E17EA9F5900ABB217 /* FPRInfo.h */,
    2713                                 0F24E53F17EA9F5900ABB217 /* GPRInfo.h */,
    27142718                                0F73D7AB165A142A00ACAB71 /* ClosureCallStubRoutine.cpp */,
    27152719                                0F73D7AC165A142A00ACAB71 /* ClosureCallStubRoutine.h */,
     
    27182722                                A7B48DB50EE74CFC00DCBDB6 /* ExecutableAllocator.h */,
    27192723                                86DB64630F95C6FC00D7D921 /* ExecutableAllocatorFixedVMPool.cpp */,
     2724                                0F24E53E17EA9F5900ABB217 /* FPRInfo.h */,
    27202725                                0F766D2D15A8DCDD008F363E /* GCAwareJITStubRoutine.cpp */,
    27212726                                0F766D2E15A8DCDD008F363E /* GCAwareJITStubRoutine.h */,
     2727                                0F24E53F17EA9F5900ABB217 /* GPRInfo.h */,
    27222728                                0F4680D014BBC5F800BFE272 /* HostCallReturnValue.cpp */,
    27232729                                0F4680D114BBC5F800BFE272 /* HostCallReturnValue.h */,
     
    27382744                                BCDD51E90FB8DF74004A8BDC /* JITOpcodes.cpp */,
    27392745                                A71236E41195F33C00BD2174 /* JITOpcodes32_64.cpp */,
     2746                                0F24E54517EE274900ABB217 /* JITOperations.cpp */,
     2747                                0F24E54617EE274900ABB217 /* JITOperations.h */,
     2748                                0F24E54717EE274900ABB217 /* JITOperationWrappers.h */,
    27402749                                86CC85C30EE7A89400288682 /* JITPropertyAccess.cpp */,
    27412750                                A7C1E8C8112E701C00A37F98 /* JITPropertyAccess32_64.cpp */,
     
    27602769                                0F766D3215AE2535008F363E /* JumpReplacementWatchpoint.cpp */,
    27612770                                0F766D3315AE2535008F363E /* JumpReplacementWatchpoint.h */,
     2771                                0F24E54817EE274900ABB217 /* RegisterSet.h */,
     2772                                0F24E54917EE274900ABB217 /* Repatch.cpp */,
     2773                                0F24E54A17EE274900ABB217 /* Repatch.h */,
     2774                                0F24E54B17EE274900ABB217 /* ScratchRegisterAllocator.h */,
    27622775                                A709F2EF17A0AC0400512E98 /* SlowPathCall.h */,
    27632776                                A7386551118697B400540279 /* SpecializedThunkJIT.h */,
     
    36163629                                0FFFC95214EF909500C72532 /* DFGPredictionPropagationPhase.h */,
    36173630                                86EC9DC11328DF82002B2AD7 /* DFGRegisterBank.h */,
    3618                                 0F766D4215B2A3BD008F363E /* DFGRegisterSet.h */,
    3619                                 86BB09BE138E381B0056702F /* DFGRepatch.cpp */,
    3620                                 86BB09BF138E381B0056702F /* DFGRepatch.h */,
    36213631                                A77A423C17A0BBFD00A8DB81 /* DFGSafeToExecute.h */,
    36223632                                A741017E179DAF80002EB8BA /* DFGSaneStringGetByValSlowPathGenerator.h */,
    36233633                                86ECA3F9132DF25A002B2AD7 /* DFGScoreBoard.h */,
    3624                                 0F766D4515B3701D008F363E /* DFGScratchRegisterAllocator.h */,
    36253634                                0F1E3A65153A21DF000F9456 /* DFGSilentRegisterSavePlan.h */,
    36263635                                0F1E3A501537C2CB000F9456 /* DFGSlowPathGenerator.h */,
     
    39503959                                0FFB921816D02EB20055A5DB /* DFGAllocator.h in Headers */,
    39513960                                A737810C1799EA2E00817533 /* DFGAnalysis.h in Headers */,
     3961                                0F24E54E17EE274900ABB217 /* JITOperationWrappers.h in Headers */,
    39523962                                0F1E3A461534CBAF000F9456 /* DFGArgumentPosition.h in Headers */,
    39533963                                0F16015E156198C900C2587C /* DFGArgumentsSimplificationPhase.h in Headers */,
     
    39603970                                A70B083317A0B79B00DAF14B /* DFGBinarySwitch.h in Headers */,
    39613971                                A7D89CF417A0B8CC00773AD8 /* DFGBlockInsertionSet.h in Headers */,
     3972                                0F24E55217EE274900ABB217 /* ScratchRegisterAllocator.h in Headers */,
    39623973                                0F8364B7164B0C110053329A /* DFGBranchDirection.h in Headers */,
    39633974                                86EC9DC51328DF82002B2AD7 /* DFGByteCodeParser.h in Headers */,
     
    40344045                                0FFFC95E14EF90B700C72532 /* DFGPredictionPropagationPhase.h in Headers */,
    40354046                                86EC9DD11328DF82002B2AD7 /* DFGRegisterBank.h in Headers */,
    4036                                 0F766D4415B2A3C0008F363E /* DFGRegisterSet.h in Headers */,
    4037                                 86BB09C1138E381B0056702F /* DFGRepatch.h in Headers */,
    40384047                                2AD8932B17E3868F00668276 /* HeapIterationScope.h in Headers */,
    40394048                                A77A424317A0BBFD00A8DB81 /* DFGSafeToExecute.h in Headers */,
     
    40414050                                86ECA3FA132DF25A002B2AD7 /* DFGScoreBoard.h in Headers */,
    40424051                                0FD8A31417D4326C00CA2C40 /* CodeBlockSet.h in Headers */,
    4043                                 0F766D4615B3701F008F363E /* DFGScratchRegisterAllocator.h in Headers */,
    40444052                                0F1E3A67153A21E2000F9456 /* DFGSilentRegisterSavePlan.h in Headers */,
    40454053                                0FFB921D16D02F300055A5DB /* DFGSlowPathGenerator.h in Headers */,
     
    41764184                                0F5EF91F16878F7D003E5C25 /* JITThunks.h in Headers */,
    41774185                                0FC712E317CD8793008CC93C /* JITToDFGDeferredCompilationCallback.h in Headers */,
     4186                                0F24E54D17EE274900ABB217 /* JITOperations.h in Headers */,
    41784187                                A76F54A313B28AAB00EF2BCE /* JITWriteBarrier.h in Headers */,
    41794188                                BC18C4160E16F5CD00B34460 /* JSActivation.h in Headers */,
     
    44704479                                0FF42744158EBE91004CB9FF /* udis86_input.h in Headers */,
    44714480                                0FF42748158EBE91004CB9FF /* udis86_syn.h in Headers */,
     4481                                0F24E55117EE274900ABB217 /* Repatch.h in Headers */,
     4482                                0F24E54F17EE274900ABB217 /* RegisterSet.h in Headers */,
    44724483                                0FF42749158EBE91004CB9FF /* udis86_types.h in Headers */,
    44734484                                A7E5AB391799E4B200D2833D /* UDis86Disassembler.h in Headers */,
     
    49394950                                A7D89CF717A0B8CC00773AD8 /* DFGFlushFormat.cpp in Sources */,
    49404951                                A7D89CF917A0B8CC00773AD8 /* DFGFlushLivenessAnalysisPhase.cpp in Sources */,
     4952                                0F24E54C17EE274900ABB217 /* JITOperations.cpp in Sources */,
    49414953                                86EC9DC71328DF82002B2AD7 /* DFGGraph.cpp in Sources */,
    49424954                                A704D90517A0BAA8006BA554 /* DFGInPlaceAbstractState.cpp in Sources */,
     
    49694981                                0FBE0F7416C1DB090082C5E8 /* DFGPredictionInjectionPhase.cpp in Sources */,
    49704982                                0FFFC95D14EF90B300C72532 /* DFGPredictionPropagationPhase.cpp in Sources */,
    4971                                 86BB09C0138E381B0056702F /* DFGRepatch.cpp in Sources */,
    49724983                                86EC9DD21328DF82002B2AD7 /* DFGSpeculativeJIT.cpp in Sources */,
    49734984                                86880F1F14328BB900B08D42 /* DFGSpeculativeJIT32_64.cpp in Sources */,
     
    52355246                                BCDE3B430E6C832D001453A7 /* Structure.cpp in Sources */,
    52365247                                7E4EE70F0EBB7A5B005934AA /* StructureChain.cpp in Sources */,
     5248                                0F24E55017EE274900ABB217 /* Repatch.cpp in Sources */,
    52375249                                C2F0F2D116BAEEE900187C19 /* StructureRareData.cpp in Sources */,
    52385250                                0F766D3815AE4A1C008F363E /* StructureStubClearingWatchpoint.cpp in Sources */,
  • trunk/Source/JavaScriptCore/Target.pri

    r156300 r156490  
    184184    dfg/DFGPredictionPropagationPhase.cpp \
    185185    dfg/DFGPredictionInjectionPhase.cpp \
    186     dfg/DFGRepatch.cpp \
    187186    dfg/DFGSSAConversionPhase.cpp \
    188187    dfg/DFGSpeculativeJIT.cpp \
     
    223222    jit/JITOpcodes.cpp \
    224223    jit/JITOpcodes32_64.cpp \
     224    jit/JITOperations.cpp \
    225225    jit/JITPropertyAccess.cpp \
    226226    jit/JITPropertyAccess32_64.cpp \
     
    230230    jit/JITToDFGDeferredCompilationCallback.cpp \
    231231    jit/JumpReplacementWatchpoint.cpp \
     232    jit/Repatch.cpp \
    232233    jit/ThunkGenerators.cpp \
    233234    llint/LLIntCLoop.cpp \
  • trunk/Source/JavaScriptCore/bytecode/CallLinkInfo.cpp

    r156237 r156490  
    4141    if (isDFG) {
    4242#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());
    4444#else
    4545        RELEASE_ASSERT_NOT_REACHED();
    4646#endif
    4747    } 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());
    4949    hasSeenShouldRepatch = false;
    5050    callee.clear();
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r156482 r156490  
    3737#include "DFGDriver.h"
    3838#include "DFGNode.h"
    39 #include "DFGRepatch.h"
    4039#include "DFGWorklist.h"
    4140#include "Debugger.h"
     
    5150#include "PolymorphicPutByIdList.h"
    5251#include "ReduceWhitespace.h"
     52#include "Repatch.h"
    5353#include "RepatchBuffer.h"
    5454#include "SlotVisitorInlines.h"
     
    23872387    case JITCode::DFGJIT:
    23882388        if (isGetByIdAccess(accessType))
    2389             DFG::resetGetByID(repatchBuffer, stubInfo);
     2389            resetGetByID(repatchBuffer, stubInfo);
    23902390        else if (isPutByIdAccess(accessType))
    2391             DFG::resetPutByID(repatchBuffer, stubInfo);
     2391            resetPutByID(repatchBuffer, stubInfo);
    23922392        else {
    23932393            RELEASE_ASSERT(isInAccess(accessType));
    2394             DFG::resetIn(repatchBuffer, stubInfo);
     2394            resetIn(repatchBuffer, stubInfo);
    23952395        }
    23962396        break;
  • trunk/Source/JavaScriptCore/bytecode/StructureStubInfo.h

    r156237 r156490  
    3232
    3333#include "CodeOrigin.h"
    34 #include "DFGRegisterSet.h"
    3534#include "Instruction.h"
    3635#include "JITStubRoutine.h"
     
    3837#include "Opcode.h"
    3938#include "PolymorphicAccessStructureList.h"
     39#include "RegisterSet.h"
    4040#include "Structure.h"
    4141#include "StructureStubClearingWatchpoint.h"
     
    232232#endif
    233233            int8_t valueGPR;
    234             DFG::RegisterSetPOD usedRegisters;
     234            RegisterSetPOD usedRegisters;
    235235            int32_t deltaCallToDone;
    236236            int32_t deltaCallToStorageLoad;
  • trunk/Source/JavaScriptCore/dfg/DFGCallArrayAllocatorSlowPathGenerator.h

    r156237 r156490  
    4141public:
    4242    CallArrayAllocatorSlowPathGenerator(
    43         MacroAssembler::JumpList from, SpeculativeJIT* jit, P_DFGOperation_EStZ function,
     43        MacroAssembler::JumpList from, SpeculativeJIT* jit, P_JITOperation_EStZ function,
    4444        GPRReg resultGPR, GPRReg storageGPR, Structure* structure, size_t size)
    4545        : JumpingSlowPathGenerator<MacroAssembler::JumpList>(from, jit)
     
    6969   
    7070private:
    71     P_DFGOperation_EStZ m_function;
     71    P_JITOperation_EStZ m_function;
    7272    GPRReg m_resultGPR;
    7373    GPRReg m_storageGPR;
     
    8080public:
    8181    CallArrayAllocatorWithVariableSizeSlowPathGenerator(
    82         MacroAssembler::JumpList from, SpeculativeJIT* jit, P_DFGOperation_EStZ function,
     82        MacroAssembler::JumpList from, SpeculativeJIT* jit, P_JITOperation_EStZ function,
    8383        GPRReg resultGPR, Structure* contiguousStructure, Structure* arrayStorageStructure, GPRReg sizeGPR)
    8484        : JumpingSlowPathGenerator<MacroAssembler::JumpList>(from, jit)
     
    113113   
    114114private:
    115     P_DFGOperation_EStZ m_function;
     115    P_JITOperation_EStZ m_function;
    116116    GPRReg m_resultGPR;
    117117    Structure* m_contiguousStructure;
  • trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.h

    r156300 r156490  
    3737#include "DFGOSRExitCompilationInfo.h"
    3838#include "DFGRegisterBank.h"
    39 #include "DFGRegisterSet.h"
    4039#include "FPRInfo.h"
    4140#include "GPRInfo.h"
     
    4342#include "LinkBuffer.h"
    4443#include "MacroAssembler.h"
     44#include "RegisterSet.h"
    4545
    4646namespace JSC {
  • trunk/Source/JavaScriptCore/dfg/DFGOSRExitCompiler.h

    r156237 r156490  
    7777
    7878extern "C" {
    79 void DFG_OPERATION compileOSRExit(ExecState*) WTF_INTERNAL;
     79void JIT_OPERATION compileOSRExit(ExecState*) WTF_INTERNAL;
    8080}
    8181
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r156300 r156490  
    3434#include "DFGDriver.h"
    3535#include "DFGOSRExit.h"
    36 #include "DFGRepatch.h"
    3736#include "DFGThunks.h"
    3837#include "DFGToFTLDeferredCompilationCallback.h"
     
    4645#include "JIT.h"
    4746#include "JITExceptions.h"
     47#include "JITOperationWrappers.h"
    4848#include "JSActivation.h"
    4949#include "VM.h"
     
    5252#include "ObjectConstructor.h"
    5353#include "Operations.h"
     54#include "Repatch.h"
    5455#include "StringConstructor.h"
    5556#include "TypedArrayInlines.h"
     
    5758
    5859#if ENABLE(JIT)
    59 
    60 #if CPU(MIPS)
    61 #if WTF_MIPS_PIC
    62 #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 #else
    68 #define LOAD_FUNCTION_TO_T9(function) "" "\n"
    69 #endif
    70 #endif
    71 
    7260#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 #else
    140 #define INSTRUCTION_STORE_RETURN_ADDRESS_EJI "str lr, [sp, #0]"
    141 #define INSTRUCTION_STORE_RETURN_ADDRESS_EJCI "str lr, [sp, #4]"
    142 #endif
    143 
    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 #else
    200 #define INSTRUCTION_STORE_RETURN_ADDRESS_EJI "str lr, [sp, #0]"
    201 #define INSTRUCTION_STORE_RETURN_ADDRESS_EJCI "str lr, [sp, #4]"
    202 #endif
    203 
    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 #endif
    320 
    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)
    33661
    33762namespace JSC { namespace DFG {
     
    35883
    35984template<bool strict>
    360 ALWAYS_INLINE static void DFG_OPERATION operationPutByValInternal(ExecState* exec, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue)
     85ALWAYS_INLINE static void JIT_OPERATION operationPutByValInternal(ExecState* exec, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue)
    36186{
    36287    VM* vm = &exec->vm();
     
    467192extern "C" {
    468193
    469 EncodedJSValue DFG_OPERATION operationToThis(ExecState* exec, EncodedJSValue encodedOp)
     194EncodedJSValue JIT_OPERATION operationToThis(ExecState* exec, EncodedJSValue encodedOp)
    470195{
    471196    VM* vm = &exec->vm();
     
    475200}
    476201
    477 EncodedJSValue DFG_OPERATION operationToThisStrict(ExecState* exec, EncodedJSValue encodedOp)
     202EncodedJSValue JIT_OPERATION operationToThisStrict(ExecState* exec, EncodedJSValue encodedOp)
    478203{
    479204    VM* vm = &exec->vm();
     
    483208}
    484209
    485 JSCell* DFG_OPERATION operationCreateThis(ExecState* exec, JSObject* constructor, int32_t inlineCapacity)
     210JSCell* JIT_OPERATION operationCreateThis(ExecState* exec, JSObject* constructor, int32_t inlineCapacity)
    486211{
    487212    VM* vm = &exec->vm();
     
    496221}
    497222
    498 JSCell* DFG_OPERATION operationNewObject(ExecState* exec, Structure* structure)
     223JSCell* JIT_OPERATION operationNewObject(ExecState* exec, Structure* structure)
    499224{
    500225    VM* vm = &exec->vm();
     
    504229}
    505230
    506 EncodedJSValue DFG_OPERATION operationValueAdd(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
     231EncodedJSValue JIT_OPERATION operationValueAdd(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
    507232{
    508233    VM* vm = &exec->vm();
     
    515240}
    516241
    517 EncodedJSValue DFG_OPERATION operationValueAddNotNumber(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
     242EncodedJSValue JIT_OPERATION operationValueAddNotNumber(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
    518243{
    519244    VM* vm = &exec->vm();
     
    548273}
    549274
    550 EncodedJSValue DFG_OPERATION operationGetByVal(ExecState* exec, EncodedJSValue encodedBase, EncodedJSValue encodedProperty)
     275EncodedJSValue JIT_OPERATION operationGetByVal(ExecState* exec, EncodedJSValue encodedBase, EncodedJSValue encodedProperty)
    551276{
    552277    VM* vm = &exec->vm();
     
    579304}
    580305
    581 EncodedJSValue DFG_OPERATION operationGetByValCell(ExecState* exec, JSCell* base, EncodedJSValue encodedProperty)
     306EncodedJSValue JIT_OPERATION operationGetByValCell(ExecState* exec, JSCell* base, EncodedJSValue encodedProperty)
    582307{
    583308    VM* vm = &exec->vm();
     
    619344}
    620345
    621 EncodedJSValue DFG_OPERATION operationGetByValArrayInt(ExecState* exec, JSArray* base, int32_t index)
     346EncodedJSValue JIT_OPERATION operationGetByValArrayInt(ExecState* exec, JSArray* base, int32_t index)
    622347{
    623348    return getByValCellInt(exec, base, index);
    624349}
    625350
    626 EncodedJSValue DFG_OPERATION operationGetByValStringInt(ExecState* exec, JSString* base, int32_t index)
     351EncodedJSValue JIT_OPERATION operationGetByValStringInt(ExecState* exec, JSString* base, int32_t index)
    627352{
    628353    return getByValCellInt(exec, base, index);
    629354}
    630355
    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)
     356void JIT_OPERATION operationPutByValStrict(ExecState* exec, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue)
    755357{
    756358    VM* vm = &exec->vm();
     
    760362}
    761363
    762 void DFG_OPERATION operationPutByValNonStrict(ExecState* exec, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue)
     364void JIT_OPERATION operationPutByValNonStrict(ExecState* exec, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue)
    763365{
    764366    VM* vm = &exec->vm();
     
    768370}
    769371
    770 void DFG_OPERATION operationPutByValCellStrict(ExecState* exec, JSCell* cell, EncodedJSValue encodedProperty, EncodedJSValue encodedValue)
     372void JIT_OPERATION operationPutByValCellStrict(ExecState* exec, JSCell* cell, EncodedJSValue encodedProperty, EncodedJSValue encodedValue)
    771373{
    772374    VM* vm = &exec->vm();
     
    776378}
    777379
    778 void DFG_OPERATION operationPutByValCellNonStrict(ExecState* exec, JSCell* cell, EncodedJSValue encodedProperty, EncodedJSValue encodedValue)
     380void JIT_OPERATION operationPutByValCellNonStrict(ExecState* exec, JSCell* cell, EncodedJSValue encodedProperty, EncodedJSValue encodedValue)
    779381{
    780382    VM* vm = &exec->vm();
     
    784386}
    785387
    786 void DFG_OPERATION operationPutByValBeyondArrayBoundsStrict(ExecState* exec, JSObject* array, int32_t index, EncodedJSValue encodedValue)
     388void JIT_OPERATION operationPutByValBeyondArrayBoundsStrict(ExecState* exec, JSObject* array, int32_t index, EncodedJSValue encodedValue)
    787389{
    788390    VM* vm = &exec->vm();
     
    799401}
    800402
    801 void DFG_OPERATION operationPutByValBeyondArrayBoundsNonStrict(ExecState* exec, JSObject* array, int32_t index, EncodedJSValue encodedValue)
     403void JIT_OPERATION operationPutByValBeyondArrayBoundsNonStrict(ExecState* exec, JSObject* array, int32_t index, EncodedJSValue encodedValue)
    802404{
    803405    VM* vm = &exec->vm();
     
    814416}
    815417
    816 void DFG_OPERATION operationPutDoubleByValBeyondArrayBoundsStrict(ExecState* exec, JSObject* array, int32_t index, double value)
     418void JIT_OPERATION operationPutDoubleByValBeyondArrayBoundsStrict(ExecState* exec, JSObject* array, int32_t index, double value)
    817419{
    818420    VM* vm = &exec->vm();
     
    831433}
    832434
    833 void DFG_OPERATION operationPutDoubleByValBeyondArrayBoundsNonStrict(ExecState* exec, JSObject* array, int32_t index, double value)
     435void JIT_OPERATION operationPutDoubleByValBeyondArrayBoundsNonStrict(ExecState* exec, JSObject* array, int32_t index, double value)
    834436{
    835437    VM* vm = &exec->vm();
     
    848450}
    849451
    850 EncodedJSValue DFG_OPERATION operationArrayPush(ExecState* exec, EncodedJSValue encodedValue, JSArray* array)
     452EncodedJSValue JIT_OPERATION operationArrayPush(ExecState* exec, EncodedJSValue encodedValue, JSArray* array)
    851453{
    852454    VM* vm = &exec->vm();
     
    857459}
    858460
    859 EncodedJSValue DFG_OPERATION operationArrayPushDouble(ExecState* exec, double value, JSArray* array)
     461EncodedJSValue JIT_OPERATION operationArrayPushDouble(ExecState* exec, double value, JSArray* array)
    860462{
    861463    VM* vm = &exec->vm();
     
    866468}
    867469
    868 EncodedJSValue DFG_OPERATION operationArrayPop(ExecState* exec, JSArray* array)
     470EncodedJSValue JIT_OPERATION operationArrayPop(ExecState* exec, JSArray* array)
    869471{
    870472    VM* vm = &exec->vm();
     
    874476}
    875477       
    876 EncodedJSValue DFG_OPERATION operationArrayPopAndRecoverLength(ExecState* exec, JSArray* array)
     478EncodedJSValue JIT_OPERATION operationArrayPopAndRecoverLength(ExecState* exec, JSArray* array)
    877479{
    878480    VM* vm = &exec->vm();
     
    884486}
    885487       
    886 EncodedJSValue DFG_OPERATION operationRegExpExec(ExecState* exec, JSCell* base, JSCell* argument)
     488EncodedJSValue JIT_OPERATION operationRegExpExec(ExecState* exec, JSCell* base, JSCell* argument)
    887489{
    888490    VM& vm = exec->vm();
     
    897499}
    898500       
    899 size_t DFG_OPERATION operationRegExpTest(ExecState* exec, JSCell* base, JSCell* argument)
     501size_t JIT_OPERATION operationRegExpTest(ExecState* exec, JSCell* base, JSCell* argument)
    900502{
    901503    VM& vm = exec->vm();
     
    912514}
    913515       
    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)
     516size_t JIT_OPERATION operationCompareLess(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
    1145517{
    1146518    VM* vm = &exec->vm();
     
    1150522}
    1151523
    1152 size_t DFG_OPERATION operationCompareLessEq(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
     524size_t JIT_OPERATION operationCompareLessEq(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
    1153525{
    1154526    VM* vm = &exec->vm();
     
    1158530}
    1159531
    1160 size_t DFG_OPERATION operationCompareGreater(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
     532size_t JIT_OPERATION operationCompareGreater(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
    1161533{
    1162534    VM* vm = &exec->vm();
     
    1166538}
    1167539
    1168 size_t DFG_OPERATION operationCompareGreaterEq(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
     540size_t JIT_OPERATION operationCompareGreaterEq(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
    1169541{
    1170542    VM* vm = &exec->vm();
     
    1174546}
    1175547
    1176 size_t DFG_OPERATION operationCompareEq(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
     548size_t JIT_OPERATION operationCompareEq(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
    1177549{
    1178550    VM* vm = &exec->vm();
     
    1183555
    1184556#if USE(JSVALUE64)
    1185 EncodedJSValue DFG_OPERATION operationCompareStringEq(ExecState* exec, JSCell* left, JSCell* right)
     557EncodedJSValue JIT_OPERATION operationCompareStringEq(ExecState* exec, JSCell* left, JSCell* right)
    1186558#else
    1187 size_t DFG_OPERATION operationCompareStringEq(ExecState* exec, JSCell* left, JSCell* right)
     559size_t JIT_OPERATION operationCompareStringEq(ExecState* exec, JSCell* left, JSCell* right)
    1188560#endif
    1189561{
     
    1199571}
    1200572
    1201 size_t DFG_OPERATION operationCompareStrictEqCell(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
     573size_t JIT_OPERATION operationCompareStrictEqCell(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
    1202574{
    1203575    VM* vm = &exec->vm();
     
    1213585}
    1214586
    1215 size_t DFG_OPERATION operationCompareStrictEq(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
     587size_t JIT_OPERATION operationCompareStrictEq(ExecState* exec, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2)
    1216588{
    1217589    VM* vm = &exec->vm();
     
    1224596}
    1225597
    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)
     598EncodedJSValue JIT_OPERATION operationToPrimitive(ExecState* exec, EncodedJSValue value)
    1413599{
    1414600    VM* vm = &exec->vm();
     
    1418604}
    1419605
    1420 char* DFG_OPERATION operationNewArray(ExecState* exec, Structure* arrayStructure, void* buffer, size_t size)
     606char* JIT_OPERATION operationNewArray(ExecState* exec, Structure* arrayStructure, void* buffer, size_t size)
    1421607{
    1422608    VM* vm = &exec->vm();
     
    1426612}
    1427613
    1428 char* DFG_OPERATION operationNewEmptyArray(ExecState* exec, Structure* arrayStructure)
     614char* JIT_OPERATION operationNewEmptyArray(ExecState* exec, Structure* arrayStructure)
    1429615{
    1430616    VM* vm = &exec->vm();
     
    1434620}
    1435621
    1436 char* DFG_OPERATION operationNewArrayWithSize(ExecState* exec, Structure* arrayStructure, int32_t size)
     622char* JIT_OPERATION operationNewArrayWithSize(ExecState* exec, Structure* arrayStructure, int32_t size)
    1437623{
    1438624    VM* vm = &exec->vm();
     
    1445631}
    1446632
    1447 char* DFG_OPERATION operationNewArrayBuffer(ExecState* exec, Structure* arrayStructure, size_t start, size_t size)
     633char* JIT_OPERATION operationNewArrayBuffer(ExecState* exec, Structure* arrayStructure, size_t start, size_t size)
    1448634{
    1449635    VM& vm = exec->vm();
     
    1452638}
    1453639
    1454 char* DFG_OPERATION operationNewInt8ArrayWithSize(
     640char* JIT_OPERATION operationNewInt8ArrayWithSize(
    1455641    ExecState* exec, Structure* structure, int32_t length)
    1456642{
     
    1458644}
    1459645
    1460 char* DFG_OPERATION operationNewInt8ArrayWithOneArgument(
     646char* JIT_OPERATION operationNewInt8ArrayWithOneArgument(
    1461647    ExecState* exec, Structure* structure, EncodedJSValue encodedValue)
    1462648{
     
    1464650}
    1465651
    1466 char* DFG_OPERATION operationNewInt16ArrayWithSize(
     652char* JIT_OPERATION operationNewInt16ArrayWithSize(
    1467653    ExecState* exec, Structure* structure, int32_t length)
    1468654{
     
    1470656}
    1471657
    1472 char* DFG_OPERATION operationNewInt16ArrayWithOneArgument(
     658char* JIT_OPERATION operationNewInt16ArrayWithOneArgument(
    1473659    ExecState* exec, Structure* structure, EncodedJSValue encodedValue)
    1474660{
     
    1476662}
    1477663
    1478 char* DFG_OPERATION operationNewInt32ArrayWithSize(
     664char* JIT_OPERATION operationNewInt32ArrayWithSize(
    1479665    ExecState* exec, Structure* structure, int32_t length)
    1480666{
     
    1482668}
    1483669
    1484 char* DFG_OPERATION operationNewInt32ArrayWithOneArgument(
     670char* JIT_OPERATION operationNewInt32ArrayWithOneArgument(
    1485671    ExecState* exec, Structure* structure, EncodedJSValue encodedValue)
    1486672{
     
    1488674}
    1489675
    1490 char* DFG_OPERATION operationNewUint8ArrayWithSize(
     676char* JIT_OPERATION operationNewUint8ArrayWithSize(
    1491677    ExecState* exec, Structure* structure, int32_t length)
    1492678{
     
    1494680}
    1495681
    1496 char* DFG_OPERATION operationNewUint8ArrayWithOneArgument(
     682char* JIT_OPERATION operationNewUint8ArrayWithOneArgument(
    1497683    ExecState* exec, Structure* structure, EncodedJSValue encodedValue)
    1498684{
     
    1500686}
    1501687
    1502 char* DFG_OPERATION operationNewUint8ClampedArrayWithSize(
     688char* JIT_OPERATION operationNewUint8ClampedArrayWithSize(
    1503689    ExecState* exec, Structure* structure, int32_t length)
    1504690{
     
    1506692}
    1507693
    1508 char* DFG_OPERATION operationNewUint8ClampedArrayWithOneArgument(
     694char* JIT_OPERATION operationNewUint8ClampedArrayWithOneArgument(
    1509695    ExecState* exec, Structure* structure, EncodedJSValue encodedValue)
    1510696{
     
    1512698}
    1513699
    1514 char* DFG_OPERATION operationNewUint16ArrayWithSize(
     700char* JIT_OPERATION operationNewUint16ArrayWithSize(
    1515701    ExecState* exec, Structure* structure, int32_t length)
    1516702{
     
    1518704}
    1519705
    1520 char* DFG_OPERATION operationNewUint16ArrayWithOneArgument(
     706char* JIT_OPERATION operationNewUint16ArrayWithOneArgument(
    1521707    ExecState* exec, Structure* structure, EncodedJSValue encodedValue)
    1522708{
     
    1524710}
    1525711
    1526 char* DFG_OPERATION operationNewUint32ArrayWithSize(
     712char* JIT_OPERATION operationNewUint32ArrayWithSize(
    1527713    ExecState* exec, Structure* structure, int32_t length)
    1528714{
     
    1530716}
    1531717
    1532 char* DFG_OPERATION operationNewUint32ArrayWithOneArgument(
     718char* JIT_OPERATION operationNewUint32ArrayWithOneArgument(
    1533719    ExecState* exec, Structure* structure, EncodedJSValue encodedValue)
    1534720{
     
    1536722}
    1537723
    1538 char* DFG_OPERATION operationNewFloat32ArrayWithSize(
     724char* JIT_OPERATION operationNewFloat32ArrayWithSize(
    1539725    ExecState* exec, Structure* structure, int32_t length)
    1540726{
     
    1542728}
    1543729
    1544 char* DFG_OPERATION operationNewFloat32ArrayWithOneArgument(
     730char* JIT_OPERATION operationNewFloat32ArrayWithOneArgument(
    1545731    ExecState* exec, Structure* structure, EncodedJSValue encodedValue)
    1546732{
     
    1548734}
    1549735
    1550 char* DFG_OPERATION operationNewFloat64ArrayWithSize(
     736char* JIT_OPERATION operationNewFloat64ArrayWithSize(
    1551737    ExecState* exec, Structure* structure, int32_t length)
    1552738{
     
    1554740}
    1555741
    1556 char* DFG_OPERATION operationNewFloat64ArrayWithOneArgument(
     742char* JIT_OPERATION operationNewFloat64ArrayWithOneArgument(
    1557743    ExecState* exec, Structure* structure, EncodedJSValue encodedValue)
    1558744{
     
    1560746}
    1561747
    1562 EncodedJSValue DFG_OPERATION operationNewRegexp(ExecState* exec, void* regexpPtr)
     748EncodedJSValue JIT_OPERATION operationNewRegexp(ExecState* exec, void* regexpPtr)
    1563749{
    1564750    VM& vm = exec->vm();
     
    1573759}
    1574760
    1575 JSCell* DFG_OPERATION operationCreateActivation(ExecState* exec)
     761JSCell* JIT_OPERATION operationCreateActivation(ExecState* exec)
    1576762{
    1577763    VM& vm = exec->vm();
     
    1582768}
    1583769
    1584 JSCell* DFG_OPERATION operationCreateArguments(ExecState* exec)
     770JSCell* JIT_OPERATION operationCreateArguments(ExecState* exec)
    1585771{
    1586772    VM& vm = exec->vm();
     
    1593779}
    1594780
    1595 JSCell* DFG_OPERATION operationCreateInlinedArguments(
     781JSCell* JIT_OPERATION operationCreateInlinedArguments(
    1596782    ExecState* exec, InlineCallFrame* inlineCallFrame)
    1597783{
     
    1605791}
    1606792
    1607 void DFG_OPERATION operationTearOffArguments(ExecState* exec, JSCell* argumentsCell, JSCell* activationCell)
     793void JIT_OPERATION operationTearOffArguments(ExecState* exec, JSCell* argumentsCell, JSCell* activationCell)
    1608794{
    1609795    ASSERT(exec->codeBlock()->usesArguments());
     
    1615801}
    1616802
    1617 void DFG_OPERATION operationTearOffInlinedArguments(
     803void JIT_OPERATION operationTearOffInlinedArguments(
    1618804    ExecState* exec, JSCell* argumentsCell, JSCell* activationCell, InlineCallFrame* inlineCallFrame)
    1619805{
     
    1622808}
    1623809
    1624 EncodedJSValue DFG_OPERATION operationGetArgumentsLength(ExecState* exec, int32_t argumentsRegister)
     810EncodedJSValue JIT_OPERATION operationGetArgumentsLength(ExecState* exec, int32_t argumentsRegister)
    1625811{
    1626812    VM& vm = exec->vm();
     
    1634820}
    1635821
    1636 EncodedJSValue DFG_OPERATION operationGetArgumentByVal(ExecState* exec, int32_t argumentsRegister, int32_t index)
     822EncodedJSValue JIT_OPERATION operationGetArgumentByVal(ExecState* exec, int32_t argumentsRegister, int32_t index)
    1637823{
    1638824    VM& vm = exec->vm();
     
    1649835}
    1650836
    1651 EncodedJSValue DFG_OPERATION operationGetInlinedArgumentByVal(
     837EncodedJSValue JIT_OPERATION operationGetInlinedArgumentByVal(
    1652838    ExecState* exec, int32_t argumentsRegister, InlineCallFrame* inlineCallFrame, int32_t index)
    1653839{
     
    1667853}
    1668854
    1669 JSCell* DFG_OPERATION operationNewFunctionNoCheck(ExecState* exec, JSCell* functionExecutable)
     855JSCell* JIT_OPERATION operationNewFunctionNoCheck(ExecState* exec, JSCell* functionExecutable)
    1670856{
    1671857    ASSERT(functionExecutable->inherits(FunctionExecutable::info()));
     
    1675861}
    1676862
    1677 EncodedJSValue DFG_OPERATION operationNewFunction(ExecState* exec, JSCell* functionExecutable)
     863EncodedJSValue JIT_OPERATION operationNewFunction(ExecState* exec, JSCell* functionExecutable)
    1678864{
    1679865    ASSERT(functionExecutable->inherits(FunctionExecutable::info()));
     
    1683869}
    1684870
    1685 JSCell* DFG_OPERATION operationNewFunctionExpression(ExecState* exec, JSCell* functionExecutableAsCell)
     871JSCell* JIT_OPERATION operationNewFunctionExpression(ExecState* exec, JSCell* functionExecutableAsCell)
    1686872{
    1687873    ASSERT(functionExecutableAsCell->inherits(FunctionExecutable::info()));
     
    1695881}
    1696882
    1697 size_t DFG_OPERATION operationIsObject(ExecState* exec, EncodedJSValue value)
     883size_t JIT_OPERATION operationIsObject(ExecState* exec, EncodedJSValue value)
    1698884{
    1699885    return jsIsObjectType(exec, JSValue::decode(value));
    1700886}
    1701887
    1702 size_t DFG_OPERATION operationIsFunction(EncodedJSValue value)
     888size_t JIT_OPERATION operationIsFunction(EncodedJSValue value)
    1703889{
    1704890    return jsIsFunctionType(JSValue::decode(value));
    1705891}
    1706892
    1707 JSCell* DFG_OPERATION operationTypeOf(ExecState* exec, JSCell* value)
     893JSCell* JIT_OPERATION operationTypeOf(ExecState* exec, JSCell* value)
    1708894{
    1709895    return jsTypeStringForValue(exec, JSValue(value)).asCell();
    1710896}
    1711897
    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)
     898char* JIT_OPERATION operationAllocatePropertyStorageWithInitialCapacity(ExecState* exec)
    1724899{
    1725900    VM& vm = exec->vm();
     
    1730905}
    1731906
    1732 char* DFG_OPERATION operationAllocatePropertyStorage(ExecState* exec, size_t newSize)
     907char* JIT_OPERATION operationAllocatePropertyStorage(ExecState* exec, size_t newSize)
    1733908{
    1734909    VM& vm = exec->vm();
     
    1739914}
    1740915
    1741 char* DFG_OPERATION operationReallocateButterflyToHavePropertyStorageWithInitialCapacity(ExecState* exec, JSObject* object)
     916char* JIT_OPERATION operationReallocateButterflyToHavePropertyStorageWithInitialCapacity(ExecState* exec, JSObject* object)
    1742917{
    1743918    VM& vm = exec->vm();
     
    1750925}
    1751926
    1752 char* DFG_OPERATION operationReallocateButterflyToGrowPropertyStorage(ExecState* exec, JSObject* object, size_t newSize)
     927char* JIT_OPERATION operationReallocateButterflyToGrowPropertyStorage(ExecState* exec, JSObject* object, size_t newSize)
    1753928{
    1754929    VM& vm = exec->vm();
     
    1760935}
    1761936
    1762 char* DFG_OPERATION operationEnsureInt32(ExecState* exec, JSCell* cell)
     937char* JIT_OPERATION operationEnsureInt32(ExecState* exec, JSCell* cell)
    1763938{
    1764939    VM& vm = exec->vm();
     
    1771946}
    1772947
    1773 char* DFG_OPERATION operationEnsureDouble(ExecState* exec, JSCell* cell)
     948char* JIT_OPERATION operationEnsureDouble(ExecState* exec, JSCell* cell)
    1774949{
    1775950    VM& vm = exec->vm();
     
    1782957}
    1783958
    1784 char* DFG_OPERATION operationEnsureContiguous(ExecState* exec, JSCell* cell)
     959char* JIT_OPERATION operationEnsureContiguous(ExecState* exec, JSCell* cell)
    1785960{
    1786961    VM& vm = exec->vm();
     
    1793968}
    1794969
    1795 char* DFG_OPERATION operationRageEnsureContiguous(ExecState* exec, JSCell* cell)
     970char* JIT_OPERATION operationRageEnsureContiguous(ExecState* exec, JSCell* cell)
    1796971{
    1797972    VM& vm = exec->vm();
     
    1804979}
    1805980
    1806 char* DFG_OPERATION operationEnsureArrayStorage(ExecState* exec, JSCell* cell)
     981char* JIT_OPERATION operationEnsureArrayStorage(ExecState* exec, JSCell* cell)
    1807982{
    1808983    VM& vm = exec->vm();
     
    1815990}
    1816991
    1817 StringImpl* DFG_OPERATION operationResolveRope(ExecState* exec, JSString* string)
     992StringImpl* JIT_OPERATION operationResolveRope(ExecState* exec, JSString* string)
    1818993{
    1819994    VM& vm = exec->vm();
     
    1823998}
    1824999
    1825 JSString* DFG_OPERATION operationSingleCharacterString(ExecState* exec, int32_t character)
     1000JSString* JIT_OPERATION operationSingleCharacterString(ExecState* exec, int32_t character)
    18261001{
    18271002    VM& vm = exec->vm();
     
    18311006}
    18321007
    1833 JSCell* DFG_OPERATION operationNewStringObject(ExecState* exec, JSString* string, Structure* structure)
     1008JSCell* JIT_OPERATION operationNewStringObject(ExecState* exec, JSString* string, Structure* structure)
    18341009{
    18351010    VM& vm = exec->vm();
     
    18391014}
    18401015
    1841 JSCell* DFG_OPERATION operationToStringOnCell(ExecState* exec, JSCell* cell)
     1016JSCell* JIT_OPERATION operationToStringOnCell(ExecState* exec, JSCell* cell)
    18421017{
    18431018    VM& vm = exec->vm();
     
    18471022}
    18481023
    1849 JSCell* DFG_OPERATION operationToString(ExecState* exec, EncodedJSValue value)
     1024JSCell* JIT_OPERATION operationToString(ExecState* exec, EncodedJSValue value)
    18501025{
    18511026    VM& vm = exec->vm();
     
    18551030}
    18561031
    1857 JSCell* DFG_OPERATION operationMakeRope2(ExecState* exec, JSString* left, JSString* right)
     1032JSCell* JIT_OPERATION operationMakeRope2(ExecState* exec, JSString* left, JSString* right)
    18581033{
    18591034    VM& vm = exec->vm();
     
    18631038}
    18641039
    1865 JSCell* DFG_OPERATION operationMakeRope3(ExecState* exec, JSString* a, JSString* b, JSString* c)
     1040JSCell* JIT_OPERATION operationMakeRope3(ExecState* exec, JSString* a, JSString* b, JSString* c)
    18661041{
    18671042    VM& vm = exec->vm();
     
    18711046}
    18721047
    1873 char* DFG_OPERATION operationFindSwitchImmTargetForDouble(
     1048char* JIT_OPERATION operationFindSwitchImmTargetForDouble(
    18741049    ExecState* exec, EncodedJSValue encodedValue, size_t tableIndex)
    18751050{
     
    18851060}
    18861061
    1887 char* DFG_OPERATION operationSwitchString(ExecState* exec, size_t tableIndex, JSString* string)
     1062char* JIT_OPERATION operationSwitchString(ExecState* exec, size_t tableIndex, JSString* string)
    18881063{
    18891064    VM& vm = exec->vm();
     
    18931068}
    18941069
    1895 double DFG_OPERATION operationFModOnInts(int32_t a, int32_t b)
     1070double JIT_OPERATION operationFModOnInts(int32_t a, int32_t b)
    18961071{
    18971072    return fmod(a, b);
    18981073}
    18991074
    1900 JSCell* DFG_OPERATION operationStringFromCharCode(ExecState* exec, int32_t op1)
     1075JSCell* JIT_OPERATION operationStringFromCharCode(ExecState* exec, int32_t op1)
    19011076{
    19021077    VM* vm = &exec->vm();
     
    19051080}
    19061081
    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)
     1082size_t JIT_OPERATION dfgConvertJSValueToInt32(ExecState* exec, EncodedJSValue value)
    19211083{
    19221084    VM* vm = &exec->vm();
     
    19271089}
    19281090
    1929 size_t DFG_OPERATION dfgConvertJSValueToBoolean(ExecState* exec, EncodedJSValue encodedOp)
     1091size_t JIT_OPERATION dfgConvertJSValueToBoolean(ExecState* exec, EncodedJSValue encodedOp)
    19301092{
    19311093    VM* vm = &exec->vm();
     
    19351097}
    19361098
    1937 void DFG_OPERATION debugOperationPrintSpeculationFailure(ExecState* exec, void* debugInfoRaw, void* scratch)
     1099void JIT_OPERATION debugOperationPrintSpeculationFailure(ExecState* exec, void* debugInfoRaw, void* scratch)
    19381100{
    19391101    VM* vm = &exec->vm();
     
    19731135}
    19741136
    1975 extern "C" void DFG_OPERATION triggerReoptimizationNow(CodeBlock* codeBlock)
     1137extern "C" void JIT_OPERATION triggerReoptimizationNow(CodeBlock* codeBlock)
    19761138{
    19771139    // It's sort of preferable that we don't GC while in here. Anyways, doing so wouldn't
     
    20171179
    20181180#if ENABLE(FTL_JIT)
    2019 void DFG_OPERATION triggerTierUpNow(ExecState* exec)
     1181void JIT_OPERATION triggerTierUpNow(ExecState* exec)
    20201182{
    20211183    VM* vm = &exec->vm();
     
    20791241}
    20801242
    2081 char* DFG_OPERATION triggerOSREntryNow(
     1243char* JIT_OPERATION triggerOSREntryNow(
    20821244    ExecState* exec, int32_t bytecodeIndex, int32_t streamIndex)
    20831245{
     
    21981360// FIXME: Make calls work well. Currently they're a pure regression.
    21991361// https://bugs.webkit.org/show_bug.cgi?id=113621
    2200 EncodedJSValue DFG_OPERATION operationFTLCall(ExecState* exec)
     1362EncodedJSValue JIT_OPERATION operationFTLCall(ExecState* exec)
    22011363{
    22021364    ExecState* callerExec = exec->callerFrame();
     
    22181380// FIXME: Make calls work well. Currently they're a pure regression.
    22191381// https://bugs.webkit.org/show_bug.cgi?id=113621
    2220 EncodedJSValue DFG_OPERATION operationFTLConstruct(ExecState* exec)
     1382EncodedJSValue JIT_OPERATION operationFTLConstruct(ExecState* exec)
    22211383{
    22221384    ExecState* callerExec = exec->callerFrame();
     
    22421404#endif // ENABLE(DFG_JIT)
    22431405
    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 #endif
    2316 
    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 JSC
    2325 
    23261406#endif // ENABLE(JIT)
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.h

    r156300 r156490  
    3030
    3131#include "DFGJITCompiler.h"
     32#include "JITOperations.h"
    3233#include "PutKind.h"
    3334
     
    3839extern "C" {
    3940
    40 #if CALLING_CONVENTION_IS_STDCALL
    41 #define DFG_OPERATION CDECL
     41JSCell* 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.
     44JSCell* JIT_OPERATION operationNewObject(ExecState*, Structure*) WTF_INTERNAL;
     45JSCell* JIT_OPERATION operationCreateThis(ExecState*, JSObject* constructor, int32_t inlineCapacity) WTF_INTERNAL;
     46EncodedJSValue JIT_OPERATION operationToThis(ExecState*, EncodedJSValue encodedOp1) WTF_INTERNAL;
     47EncodedJSValue JIT_OPERATION operationToThisStrict(ExecState*, EncodedJSValue encodedOp1) WTF_INTERNAL;
     48EncodedJSValue JIT_OPERATION operationValueAdd(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL;
     49EncodedJSValue JIT_OPERATION operationValueAddNotNumber(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL;
     50EncodedJSValue JIT_OPERATION operationGetByVal(ExecState*, EncodedJSValue encodedBase, EncodedJSValue encodedProperty) WTF_INTERNAL;
     51EncodedJSValue JIT_OPERATION operationGetByValCell(ExecState*, JSCell*, EncodedJSValue encodedProperty) WTF_INTERNAL;
     52EncodedJSValue JIT_OPERATION operationGetByValArrayInt(ExecState*, JSArray*, int32_t) WTF_INTERNAL;
     53EncodedJSValue JIT_OPERATION operationGetByValStringInt(ExecState*, JSString*, int32_t) WTF_INTERNAL;
     54EncodedJSValue JIT_OPERATION operationToPrimitive(ExecState*, EncodedJSValue) WTF_INTERNAL;
     55char* JIT_OPERATION operationNewArray(ExecState*, Structure*, void*, size_t) WTF_INTERNAL;
     56char* JIT_OPERATION operationNewArrayBuffer(ExecState*, Structure*, size_t, size_t) WTF_INTERNAL;
     57char* JIT_OPERATION operationNewEmptyArray(ExecState*, Structure*) WTF_INTERNAL;
     58char* JIT_OPERATION operationNewArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL;
     59char* JIT_OPERATION operationNewInt8ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL;
     60char* JIT_OPERATION operationNewInt8ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL;
     61char* JIT_OPERATION operationNewInt16ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL;
     62char* JIT_OPERATION operationNewInt16ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL;
     63char* JIT_OPERATION operationNewInt32ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL;
     64char* JIT_OPERATION operationNewInt32ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL;
     65char* JIT_OPERATION operationNewUint8ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL;
     66char* JIT_OPERATION operationNewUint8ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL;
     67char* JIT_OPERATION operationNewUint8ClampedArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL;
     68char* JIT_OPERATION operationNewUint8ClampedArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL;
     69char* JIT_OPERATION operationNewUint16ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL;
     70char* JIT_OPERATION operationNewUint16ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL;
     71char* JIT_OPERATION operationNewUint32ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL;
     72char* JIT_OPERATION operationNewUint32ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL;
     73char* JIT_OPERATION operationNewFloat32ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL;
     74char* JIT_OPERATION operationNewFloat32ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL;
     75char* JIT_OPERATION operationNewFloat64ArrayWithSize(ExecState*, Structure*, int32_t) WTF_INTERNAL;
     76char* JIT_OPERATION operationNewFloat64ArrayWithOneArgument(ExecState*, Structure*, EncodedJSValue) WTF_INTERNAL;
     77EncodedJSValue JIT_OPERATION operationNewRegexp(ExecState*, void*) WTF_INTERNAL;
     78void JIT_OPERATION operationPutByValStrict(ExecState*, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue) WTF_INTERNAL;
     79void JIT_OPERATION operationPutByValNonStrict(ExecState*, EncodedJSValue encodedBase, EncodedJSValue encodedProperty, EncodedJSValue encodedValue) WTF_INTERNAL;
     80void JIT_OPERATION operationPutByValCellStrict(ExecState*, JSCell*, EncodedJSValue encodedProperty, EncodedJSValue encodedValue) WTF_INTERNAL;
     81void JIT_OPERATION operationPutByValCellNonStrict(ExecState*, JSCell*, EncodedJSValue encodedProperty, EncodedJSValue encodedValue) WTF_INTERNAL;
     82void JIT_OPERATION operationPutByValBeyondArrayBoundsStrict(ExecState*, JSObject*, int32_t index, EncodedJSValue encodedValue) WTF_INTERNAL;
     83void JIT_OPERATION operationPutByValBeyondArrayBoundsNonStrict(ExecState*, JSObject*, int32_t index, EncodedJSValue encodedValue) WTF_INTERNAL;
     84void JIT_OPERATION operationPutDoubleByValBeyondArrayBoundsStrict(ExecState*, JSObject*, int32_t index, double value) WTF_INTERNAL;
     85void JIT_OPERATION operationPutDoubleByValBeyondArrayBoundsNonStrict(ExecState*, JSObject*, int32_t index, double value) WTF_INTERNAL;
     86EncodedJSValue JIT_OPERATION operationArrayPush(ExecState*, EncodedJSValue encodedValue, JSArray*) WTF_INTERNAL;
     87EncodedJSValue JIT_OPERATION operationArrayPushDouble(ExecState*, double value, JSArray*) WTF_INTERNAL;
     88EncodedJSValue JIT_OPERATION operationArrayPop(ExecState*, JSArray*) WTF_INTERNAL;
     89EncodedJSValue JIT_OPERATION operationArrayPopAndRecoverLength(ExecState*, JSArray*) WTF_INTERNAL;
     90EncodedJSValue 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.
     92size_t JIT_OPERATION operationRegExpTest(ExecState*, JSCell*, JSCell*) WTF_INTERNAL;
     93size_t JIT_OPERATION operationCompareLess(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL;
     94size_t JIT_OPERATION operationCompareLessEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL;
     95size_t JIT_OPERATION operationCompareGreater(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL;
     96size_t JIT_OPERATION operationCompareGreaterEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL;
     97size_t JIT_OPERATION operationCompareEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL;
     98#if USE(JSVALUE64)
     99EncodedJSValue JIT_OPERATION operationCompareStringEq(ExecState*, JSCell* left, JSCell* right) WTF_INTERNAL;
    42100#else
    43 #define DFG_OPERATION
     101size_t JIT_OPERATION operationCompareStringEq(ExecState*, JSCell* left, JSCell* right) WTF_INTERNAL;
    44102#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*);
     103size_t JIT_OPERATION operationCompareStrictEqCell(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL;
     104size_t JIT_OPERATION operationCompareStrictEq(ExecState*, EncodedJSValue encodedOp1, EncodedJSValue encodedOp2) WTF_INTERNAL;
     105JSCell* JIT_OPERATION operationCreateActivation(ExecState*) WTF_INTERNAL;
     106JSCell* JIT_OPERATION operationCreateArguments(ExecState*) WTF_INTERNAL;
     107JSCell* JIT_OPERATION operationCreateInlinedArguments(ExecState*, InlineCallFrame*) WTF_INTERNAL;
     108void JIT_OPERATION operationTearOffArguments(ExecState*, JSCell*, JSCell*) WTF_INTERNAL;
     109void JIT_OPERATION operationTearOffInlinedArguments(ExecState*, JSCell*, JSCell*, InlineCallFrame*) WTF_INTERNAL;
     110EncodedJSValue JIT_OPERATION operationGetArgumentsLength(ExecState*, int32_t) WTF_INTERNAL;
     111EncodedJSValue JIT_OPERATION operationGetInlinedArgumentByVal(ExecState*, int32_t, InlineCallFrame*, int32_t) WTF_INTERNAL;
     112EncodedJSValue JIT_OPERATION operationGetArgumentByVal(ExecState*, int32_t, int32_t) WTF_INTERNAL;
     113JSCell* JIT_OPERATION operationNewFunctionNoCheck(ExecState*, JSCell*) WTF_INTERNAL;
     114EncodedJSValue JIT_OPERATION operationNewFunction(ExecState*, JSCell*) WTF_INTERNAL;
     115JSCell* JIT_OPERATION operationNewFunctionExpression(ExecState*, JSCell*) WTF_INTERNAL;
     116double JIT_OPERATION operationFModOnInts(int32_t, int32_t) WTF_INTERNAL;
     117size_t JIT_OPERATION operationIsObject(ExecState*, EncodedJSValue) WTF_INTERNAL;
     118size_t JIT_OPERATION operationIsFunction(EncodedJSValue) WTF_INTERNAL;
     119JSCell* JIT_OPERATION operationTypeOf(ExecState*, JSCell*) WTF_INTERNAL;
     120char* JIT_OPERATION operationAllocatePropertyStorageWithInitialCapacity(ExecState*) WTF_INTERNAL;
     121char* JIT_OPERATION operationAllocatePropertyStorage(ExecState*, size_t newSize) WTF_INTERNAL;
     122char* JIT_OPERATION operationReallocateButterflyToHavePropertyStorageWithInitialCapacity(ExecState*, JSObject*) WTF_INTERNAL;
     123char* JIT_OPERATION operationReallocateButterflyToGrowPropertyStorage(ExecState*, JSObject*, size_t newSize) WTF_INTERNAL;
     124char* JIT_OPERATION operationEnsureInt32(ExecState*, JSCell*);
     125char* JIT_OPERATION operationEnsureDouble(ExecState*, JSCell*);
     126char* JIT_OPERATION operationEnsureContiguous(ExecState*, JSCell*);
     127char* JIT_OPERATION operationRageEnsureContiguous(ExecState*, JSCell*);
     128char* JIT_OPERATION operationEnsureArrayStorage(ExecState*, JSCell*);
     129StringImpl* JIT_OPERATION operationResolveRope(ExecState*, JSString*);
     130JSString* JIT_OPERATION operationSingleCharacterString(ExecState*, int32_t);
     131
     132JSCell* JIT_OPERATION operationNewStringObject(ExecState*, JSString*, Structure*);
     133JSCell* JIT_OPERATION operationToStringOnCell(ExecState*, JSCell*);
     134JSCell* JIT_OPERATION operationToString(ExecState*, EncodedJSValue);
     135JSCell* JIT_OPERATION operationMakeRope2(ExecState*, JSString*, JSString*);
     136JSCell* JIT_OPERATION operationMakeRope3(ExecState*, JSString*, JSString*, JSString*);
     137char* JIT_OPERATION operationFindSwitchImmTargetForDouble(ExecState*, EncodedJSValue, size_t tableIndex);
     138char* JIT_OPERATION operationSwitchString(ExecState*, size_t tableIndex, JSString*);
    257139
    258140#if ENABLE(FTL_JIT)
    259141// FIXME: Make calls work well. Currently they're a pure regression.
    260142// 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;
     143EncodedJSValue JIT_OPERATION operationFTLCall(ExecState*) WTF_INTERNAL;
     144EncodedJSValue JIT_OPERATION operationFTLConstruct(ExecState*) WTF_INTERNAL;
    263145#endif // ENABLE(FTL_JIT)
    264 
    265 // This method is used to lookup an exception hander, keyed by faultLocation, which is
    266 // 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 compiler
    270 // 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 #else
    296 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 #endif
    303 DFGHandlerEncoded DFG_OPERATION lookupExceptionHandler(ExecState*) WTF_INTERNAL;
    304146
    305147// These operations implement the implicitly called ToInt32 and ToBoolean conversions from ES5.
    306148// 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;
     149size_t JIT_OPERATION dfgConvertJSValueToInt32(ExecState*, EncodedJSValue) WTF_INTERNAL;
     150size_t JIT_OPERATION dfgConvertJSValueToBoolean(ExecState*, EncodedJSValue) WTF_INTERNAL;
     151
     152void JIT_OPERATION debugOperationPrintSpeculationFailure(ExecState*, void*, void*) WTF_INTERNAL;
     153
     154void JIT_OPERATION triggerReoptimizationNow(CodeBlock*) WTF_INTERNAL;
    313155
    314156#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;
     157void JIT_OPERATION triggerTierUpNow(ExecState*) WTF_INTERNAL;
     158char* JIT_OPERATION triggerOSREntryNow(ExecState*, int32_t bytecodeIndex, int32_t streamIndex) WTF_INTERNAL;
    317159#endif // ENABLE(FTL_JIT)
    318160
    319161} // extern "C"
    320162
    321 inline P_DFGOperation_EStZ operationNewTypedArrayWithSizeForType(TypedArrayType type)
     163inline P_JITOperation_EStZ operationNewTypedArrayWithSizeForType(TypedArrayType type)
    322164{
    323165    switch (type) {
     
    348190}
    349191
    350 inline P_DFGOperation_EStJ operationNewTypedArrayWithOneArgumentForType(TypedArrayType type)
     192inline P_JITOperation_EStJ operationNewTypedArrayWithOneArgumentForType(TypedArrayType type)
    351193{
    352194    switch (type) {
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp

    r156482 r156490  
    896896}
    897897
    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 #endif
    912 }
    913 
    914898void SpeculativeJIT::writeBarrier(GPRReg ownerGPR, GPRReg valueGPR, Edge valueUse, WriteBarrierUseKind useKind, GPRReg scratch1, GPRReg scratch2)
    915899{
     
    10181002}
    10191003
    1020 bool SpeculativeJIT::nonSpeculativeCompare(Node* node, MacroAssembler::RelationalCondition cond, S_DFGOperation_EJJ helperFunction)
     1004bool SpeculativeJIT::nonSpeculativeCompare(Node* node, MacroAssembler::RelationalCondition cond, S_JITOperation_EJJ helperFunction)
    10211005{
    10221006    unsigned branchIndexInBlock = detectPeepHoleBranch();
     
    14661450
    14671451// 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)
     1452bool SpeculativeJIT::compilePeepHoleBranch(Node* node, MacroAssembler::RelationalCondition condition, MacroAssembler::DoubleCondition doubleCondition, S_JITOperation_EJJ operation)
    14691453{
    14701454    // Fused compare & branch.
     
    38433827
    38443828// 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)
     3829bool SpeculativeJIT::compare(Node* node, MacroAssembler::RelationalCondition condition, MacroAssembler::DoubleCondition doubleCondition, S_JITOperation_EJJ operation)
    38463830{
    38473831    if (compilePeepHoleBranch(node, condition, doubleCondition, operation))
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h

    r156482 r156490  
    3737#include "DFGOSRExit.h"
    3838#include "DFGOSRExitJumpPlaceholder.h"
    39 #include "DFGOperations.h"
    4039#include "DFGSilentRegisterSavePlan.h"
    4140#include "DFGValueSource.h"
     41#include "JITOperations.h"
    4242#include "MarkedAllocator.h"
     43#include "PutKind.h"
    4344#include "ValueRecovery.h"
    4445
     
    312313    }
    313314
    314     static void writeBarrier(MacroAssembler&, GPRReg ownerGPR, GPRReg scratchGPR1, GPRReg scratchGPR2, WriteBarrierUseKind);
    315 
    316315    void writeBarrier(GPRReg ownerGPR, GPRReg valueGPR, Edge valueUse, WriteBarrierUseKind, GPRReg scratchGPR1 = InvalidGPRReg, GPRReg scratchGPR2 = InvalidGPRReg);
    317316    void writeBarrier(GPRReg ownerGPR, JSCell* value, WriteBarrierUseKind, GPRReg scratchGPR1 = InvalidGPRReg, GPRReg scratchGPR2 = InvalidGPRReg);
     
    740739    bool nonSpeculativeCompareNull(Node*, Edge operand, bool invert = false);
    741740   
    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);
    745744   
    746745    void nonSpeculativePeepholeStrictEq(Node*, Node* branchNode, bool invert = false);
     
    932931    // decision as to how to fill the regsiters to setupArguments* methods.
    933932
    934     JITCompiler::Call callOperation(P_DFGOperation_E operation, GPRReg result)
     933    JITCompiler::Call callOperation(P_JITOperation_E operation, GPRReg result)
    935934    {
    936935        m_jit.setupArgumentsExecState();
    937936        return appendCallWithExceptionCheckSetResult(operation, result);
    938937    }
    939     JITCompiler::Call callOperation(P_DFGOperation_EC operation, GPRReg result, GPRReg cell)
     938    JITCompiler::Call callOperation(P_JITOperation_EC operation, GPRReg result, GPRReg cell)
    940939    {
    941940        m_jit.setupArgumentsWithExecState(cell);
    942941        return appendCallWithExceptionCheckSetResult(operation, result);
    943942    }
    944     JITCompiler::Call callOperation(P_DFGOperation_EO operation, GPRReg result, GPRReg object)
     943    JITCompiler::Call callOperation(P_JITOperation_EO operation, GPRReg result, GPRReg object)
    945944    {
    946945        m_jit.setupArgumentsWithExecState(object);
    947946        return appendCallWithExceptionCheckSetResult(operation, result);
    948947    }
    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)
    950949    {
    951950        m_jit.setupArgumentsWithExecState(object, TrustedImmPtr(size));
    952951        return appendCallWithExceptionCheckSetResult(operation, result);
    953952    }
    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)
    955954    {
    956955        m_jit.setupArgumentsWithExecState(object, TrustedImmPtr(size));
    957956        return appendCallWithExceptionCheckSetResult(operation, result);
    958957    }
    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)
    960959    {
    961960        m_jit.setupArgumentsWithExecState(object, TrustedImmPtr(static_cast<size_t>(size)));
    962961        return appendCallWithExceptionCheckSetResult(operation, result);
    963962    }
    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)
    965964    {
    966965        m_jit.setupArgumentsWithExecState(old, TrustedImmPtr(size));
    967966        return appendCallWithExceptionCheckSetResult(operation, result);
    968967    }
    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)
    970969    {
    971970        m_jit.setupArgumentsWithExecState(TrustedImmPtr(size));
    972971        return appendCallWithExceptionCheckSetResult(operation, result);
    973972    }
    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)
    975974    {
    976975        m_jit.setupArgumentsWithExecState(TrustedImmPtr(index), arg1);
    977976        return appendCallWithExceptionCheckSetResult(operation, result);
    978977    }
    979     JITCompiler::Call callOperation(P_DFGOperation_ESt operation, GPRReg result, Structure* structure)
     978    JITCompiler::Call callOperation(P_JITOperation_ESt operation, GPRReg result, Structure* structure)
    980979    {
    981980        m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure));
    982981        return appendCallWithExceptionCheckSetResult(operation, result);
    983982    }
    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)
    985984    {
    986985        m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), arg2);
    987986        return appendCallWithExceptionCheckSetResult(operation, result);
    988987    }
    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)
    990989    {
    991990        m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), TrustedImm32(arg2));
    992991        return appendCallWithExceptionCheckSetResult(operation, result);
    993992    }
    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)
    995994    {
    996995        m_jit.setupArgumentsWithExecState(arg1, arg2);
    997996        return appendCallWithExceptionCheckSetResult(operation, result);
    998997    }
    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)
    1000999    {
    10011000        m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), TrustedImmPtr(pointer), TrustedImmPtr(size));
    10021001        return appendCallWithExceptionCheckSetResult(operation, result);
    10031002    }
    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)
    10051004    {
    10061005        m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), TrustedImmPtr(index), TrustedImmPtr(size));
    10071006        return appendCallWithExceptionCheckSetResult(operation, result);
    10081007    }
    1009     JITCompiler::Call callOperation(C_DFGOperation_E operation, GPRReg result)
     1008    JITCompiler::Call callOperation(C_JITOperation_E operation, GPRReg result)
    10101009    {
    10111010        m_jit.setupArgumentsExecState();
    10121011        return appendCallWithExceptionCheckSetResult(operation, result);
    10131012    }
    1014     JITCompiler::Call callOperation(C_DFGOperation_EC operation, GPRReg result, GPRReg arg1)
     1013    JITCompiler::Call callOperation(C_JITOperation_EC operation, GPRReg result, GPRReg arg1)
    10151014    {
    10161015        m_jit.setupArgumentsWithExecState(arg1);
    10171016        return appendCallWithExceptionCheckSetResult(operation, result);
    10181017    }
    1019     JITCompiler::Call callOperation(C_DFGOperation_EC operation, GPRReg result, JSCell* cell)
     1018    JITCompiler::Call callOperation(C_JITOperation_EC operation, GPRReg result, JSCell* cell)
    10201019    {
    10211020        m_jit.setupArgumentsWithExecState(TrustedImmPtr(cell));
    10221021        return appendCallWithExceptionCheckSetResult(operation, result);
    10231022    }
    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)
    10251024    {
    10261025        m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(cell));
    10271026        return appendCallWithExceptionCheckSetResult(operation, result);
    10281027    }
    1029     JITCompiler::Call callOperation(C_DFGOperation_EIcf operation, GPRReg result, InlineCallFrame* inlineCallFrame)
     1028    JITCompiler::Call callOperation(C_JITOperation_EIcf operation, GPRReg result, InlineCallFrame* inlineCallFrame)
    10301029    {
    10311030        m_jit.setupArgumentsWithExecState(TrustedImmPtr(inlineCallFrame));
    10321031        return appendCallWithExceptionCheckSetResult(operation, result);
    10331032    }
    1034     JITCompiler::Call callOperation(C_DFGOperation_ESt operation, GPRReg result, Structure* structure)
     1033    JITCompiler::Call callOperation(C_JITOperation_ESt operation, GPRReg result, Structure* structure)
    10351034    {
    10361035        m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure));
    10371036        return appendCallWithExceptionCheckSetResult(operation, result);
    10381037    }
    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)
    10401039    {
    10411040        m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(structure));
    10421041        return appendCallWithExceptionCheckSetResult(operation, result);
    10431042    }
    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)
    10451044    {
    10461045        m_jit.setupArgumentsWithExecState(arg1, arg2);
    10471046        return appendCallWithExceptionCheckSetResult(operation, result);
    10481047    }
    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)
    10501049    {
    10511050        m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
     
    10531052    }
    10541053
    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)
    10561055    {
    10571056        m_jit.setupArgumentsWithExecState(arg1, arg2);
     
    10591058    }
    10601059
    1061     JITCompiler::Call callOperation(Jss_DFGOperation_EZ operation, GPRReg result, GPRReg arg1)
     1060    JITCompiler::Call callOperation(Jss_JITOperation_EZ operation, GPRReg result, GPRReg arg1)
    10621061    {
    10631062        m_jit.setupArgumentsWithExecState(arg1);
     
    10651064    }
    10661065
    1067     JITCompiler::Call callOperation(V_DFGOperation_EC operation, GPRReg arg1)
     1066    JITCompiler::Call callOperation(V_JITOperation_EC operation, GPRReg arg1)
    10681067    {
    10691068        m_jit.setupArgumentsWithExecState(arg1);
     
    10711070    }
    10721071
    1073     JITCompiler::Call callOperation(V_DFGOperation_ECIcf operation, GPRReg arg1, InlineCallFrame* inlineCallFrame)
     1072    JITCompiler::Call callOperation(V_JITOperation_ECIcf operation, GPRReg arg1, InlineCallFrame* inlineCallFrame)
    10741073    {
    10751074        m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(inlineCallFrame));
    10761075        return appendCallWithExceptionCheck(operation);
    10771076    }
    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)
    10791078    {
    10801079        m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(inlineCallFrame));
     
    10821081    }
    10831082
    1084     JITCompiler::Call callOperation(V_DFGOperation_ECZ operation, GPRReg arg1, int arg2)
     1083    JITCompiler::Call callOperation(V_JITOperation_ECZ operation, GPRReg arg1, int arg2)
    10851084    {
    10861085        m_jit.setupArgumentsWithExecState(arg1, TrustedImm32(arg2));
     
    10881087    }
    10891088
    1090     JITCompiler::Call callOperation(V_DFGOperation_ECC operation, GPRReg arg1, GPRReg arg2)
     1089    JITCompiler::Call callOperation(V_JITOperation_ECC operation, GPRReg arg1, GPRReg arg2)
    10911090    {
    10921091        m_jit.setupArgumentsWithExecState(arg1, arg2);
     
    10941093    }
    10951094
    1096     JITCompiler::Call callOperation(V_DFGOperation_W operation, WatchpointSet* watchpointSet)
     1095    JITCompiler::Call callOperation(V_JITOperation_W operation, WatchpointSet* watchpointSet)
    10971096    {
    10981097        m_jit.setupArguments(TrustedImmPtr(watchpointSet));
     
    11261125    }
    11271126
    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)
    11291128    {
    11301129        m_jit.setupArguments(arg1, arg2);
    11311130        return appendCallSetResult(operation, result);
    11321131    }
    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)
    11341133    {
    11351134        m_jit.setupArguments(arg1, arg2);
    11361135        return appendCallSetResult(operation, result);
    11371136    }
    1138     JITCompiler::Call callOperation(I_DFGOperation_EJss operation, GPRReg result, GPRReg arg1)
     1137    JITCompiler::Call callOperation(I_JITOperation_EJss operation, GPRReg result, GPRReg arg1)
    11391138    {
    11401139        m_jit.setupArgumentsWithExecState(arg1);
    11411140        return appendCallWithExceptionCheckSetResult(operation, result);
    11421141    }
    1143     JITCompiler::Call callOperation(C_DFGOperation_EZ operation, GPRReg result, GPRReg arg1)
     1142    JITCompiler::Call callOperation(C_JITOperation_EZ operation, GPRReg result, GPRReg arg1)
    11441143    {
    11451144        m_jit.setupArgumentsWithExecState(arg1);
     
    11481147
    11491148#if USE(JSVALUE64)
    1150     JITCompiler::Call callOperation(J_DFGOperation_E operation, GPRReg result)
     1149    JITCompiler::Call callOperation(J_JITOperation_E operation, GPRReg result)
    11511150    {
    11521151        m_jit.setupArgumentsExecState();
    11531152        return appendCallWithExceptionCheckSetResult(operation, result);
    11541153    }
    1155     JITCompiler::Call callOperation(J_DFGOperation_EP operation, GPRReg result, void* pointer)
     1154    JITCompiler::Call callOperation(J_JITOperation_EP operation, GPRReg result, void* pointer)
    11561155    {
    11571156        m_jit.setupArgumentsWithExecState(TrustedImmPtr(pointer));
    11581157        return appendCallWithExceptionCheckSetResult(operation, result);
    11591158    }
    1160     JITCompiler::Call callOperation(Z_DFGOperation_D operation, GPRReg result, FPRReg arg1)
     1159    JITCompiler::Call callOperation(Z_JITOperation_D operation, GPRReg result, FPRReg arg1)
    11611160    {
    11621161        m_jit.setupArguments(arg1);
     
    11651164        return call;
    11661165    }
    1167     JITCompiler::Call callOperation(J_DFGOperation_EI operation, GPRReg result, StringImpl* uid)
     1166    JITCompiler::Call callOperation(J_JITOperation_EI operation, GPRReg result, StringImpl* uid)
    11681167    {
    11691168        m_jit.setupArgumentsWithExecState(TrustedImmPtr(uid));
    11701169        return appendCallWithExceptionCheckSetResult(operation, result);
    11711170    }
    1172     JITCompiler::Call callOperation(J_DFGOperation_EA operation, GPRReg result, GPRReg arg1)
     1171    JITCompiler::Call callOperation(J_JITOperation_EA operation, GPRReg result, GPRReg arg1)
    11731172    {
    11741173        m_jit.setupArgumentsWithExecState(arg1);
    11751174        return appendCallWithExceptionCheckSetResult(operation, result);
    11761175    }
    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)
    11781177    {
    11791178        m_jit.setupArgumentsWithExecState(arg1, arg2);
    11801179        return appendCallWithExceptionCheckSetResult(operation, result);
    11811180    }
    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)
    11831182    {
    11841183        m_jit.setupArgumentsWithExecState(arg1, arg2);
    11851184        return appendCallWithExceptionCheckSetResult(operation, result);
    11861185    }
    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)
    11881187    {
    11891188        m_jit.setupArgumentsWithExecState(TrustedImmPtr(pointer), TrustedImmPtr(size));
    11901189        return appendCallWithExceptionCheckSetResult(operation, result);
    11911190    }
    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)
    11931192    {
    11941193        m_jit.setupArgumentsWithExecState(TrustedImm32(startConstant), TrustedImm32(numConstants));
    11951194        return appendCallWithExceptionCheckSetResult(operation, result);
    11961195    }
    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)
    11981197    {
    11991198        m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(pointer));
    12001199        return appendCallWithExceptionCheckSetResult(operation, result);
    12011200    }
    1202     JITCompiler::Call callOperation(J_DFGOperation_EC operation, GPRReg result, JSCell* cell)
     1201    JITCompiler::Call callOperation(J_JITOperation_EC operation, GPRReg result, JSCell* cell)
    12031202    {
    12041203        m_jit.setupArgumentsWithExecState(TrustedImmPtr(cell));
    12051204        return appendCallWithExceptionCheckSetResult(operation, result);
    12061205    }
    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)
    12081207    {
    12091208        m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(uid));
    12101209        return appendCallWithExceptionCheckSetResult(operation, result);
    12111210    }
    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)
    12131212    {
    12141213        m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(uid));
    12151214        return appendCallWithExceptionCheckSetResult(operation, result);
    12161215    }
    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)
    12181217    {
    12191218        m_jit.setupArgumentsWithExecState(arg1, arg2);
    12201219        return appendCallWithExceptionCheckSetResult(operation, result);
    12211220    }
    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)
    12231222    {
    12241223        m_jit.setupArgumentsWithExecState(arg1, arg2);
    12251224        return appendCallWithExceptionCheckSetResult(operation, result);
    12261225    }
    1227     JITCompiler::Call callOperation(J_DFGOperation_EP operation, GPRReg result, GPRReg arg1)
     1226    JITCompiler::Call callOperation(J_JITOperation_EP operation, GPRReg result, GPRReg arg1)
    12281227    {
    12291228        m_jit.setupArgumentsWithExecState(arg1);
    12301229        return appendCallWithExceptionCheckSetResult(operation, result);
    12311230    }
    1232     JITCompiler::Call callOperation(J_DFGOperation_EZ operation, GPRReg result, GPRReg arg1)
     1231    JITCompiler::Call callOperation(J_JITOperation_EZ operation, GPRReg result, GPRReg arg1)
    12331232    {
    12341233        m_jit.setupArgumentsWithExecState(arg1);
    12351234        return appendCallWithExceptionCheckSetResult(operation, result);
    12361235    }
    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)
    12381237    {
    12391238        m_jit.setupArgumentsWithExecState(TrustedImm32(arg1));
    12401239        return appendCallWithExceptionCheckSetResult(operation, result);
    12411240    }
    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)
    12431242    {
    12441243        m_jit.setupArgumentsWithExecState(TrustedImm32(arg1), arg2);
    12451244        return appendCallWithExceptionCheckSetResult(operation, result);
    12461245    }
    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)
    12481247    {
    12491248        m_jit.setupArgumentsWithExecState(TrustedImm32(arg1), TrustedImmPtr(inlineCallFrame), arg2);
     
    12511250    }
    12521251
    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)
    12541253    {
    12551254        m_jit.setupArgumentsWithExecState(value, TrustedImmPtr(index));
     
    12571256    }
    12581257
    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)
    12601259    {
    12611260        m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), arg2);
     
    12631262    }
    12641263
    1265     JITCompiler::Call callOperation(C_DFGOperation_EJ operation, GPRReg result, GPRReg arg1)
     1264    JITCompiler::Call callOperation(C_JITOperation_EJ operation, GPRReg result, GPRReg arg1)
    12661265    {
    12671266        m_jit.setupArgumentsWithExecState(arg1);
    12681267        return appendCallWithExceptionCheckSetResult(operation, result);
    12691268    }
    1270     JITCompiler::Call callOperation(S_DFGOperation_J operation, GPRReg result, GPRReg arg1)
     1269    JITCompiler::Call callOperation(S_JITOperation_J operation, GPRReg result, GPRReg arg1)
    12711270    {
    12721271        m_jit.setupArguments(arg1);
    12731272        return appendCallSetResult(operation, result);
    12741273    }
    1275     JITCompiler::Call callOperation(S_DFGOperation_EJ operation, GPRReg result, GPRReg arg1)
     1274    JITCompiler::Call callOperation(S_JITOperation_EJ operation, GPRReg result, GPRReg arg1)
    12761275    {
    12771276        m_jit.setupArgumentsWithExecState(arg1);
    12781277        return appendCallWithExceptionCheckSetResult(operation, result);
    12791278    }
    1280     JITCompiler::Call callOperation(J_DFGOperation_EJ operation, GPRReg result, GPRReg arg1)
     1279    JITCompiler::Call callOperation(J_JITOperation_EJ operation, GPRReg result, GPRReg arg1)
    12811280    {
    12821281        m_jit.setupArgumentsWithExecState(arg1);
    12831282        return appendCallWithExceptionCheckSetResult(operation, result);
    12841283    }
    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)
    12861285    {
    12871286        m_jit.setupArgumentsWithExecState(arg1, arg2);
     
    12891288    }
    12901289
    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)
    12921291    {
    12931292        m_jit.setupArgumentsWithExecState(arg1, arg2);
    12941293        return appendCallWithExceptionCheckSetResult(operation, result);
    12951294    }
    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)
    12971296    {
    12981297        m_jit.setupArgumentsWithExecState(arg1, arg2);
    12991298        return appendCallWithExceptionCheckSetResult(operation, result);
    13001299    }
    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)
    13021301    {
    13031302        m_jit.setupArgumentsWithExecState(arg1, MacroAssembler::TrustedImm64(JSValue::encode(jsNumber(imm.m_value))));
    13041303        return appendCallWithExceptionCheckSetResult(operation, result);
    13051304    }
    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)
    13071306    {
    13081307        m_jit.setupArgumentsWithExecState(MacroAssembler::TrustedImm64(JSValue::encode(jsNumber(imm.m_value))), arg2);
    13091308        return appendCallWithExceptionCheckSetResult(operation, result);
    13101309    }
    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)
    13121311    {
    13131312        m_jit.setupArgumentsWithExecState(arg1, arg2);
    13141313        return appendCallWithExceptionCheckSetResult(operation, result);
    13151314    }
    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)
    13171316    {
    13181317        m_jit.setupArgumentsWithExecState(arg1, arg2);
    13191318        return appendCallWithExceptionCheckSetResult(operation, result);
    13201319    }
    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)
    13221321    {
    13231322        m_jit.setupArgumentsWithExecState(arg1, arg2.gpr());
     
    13251324    }
    13261325
    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)
    13281327    {
    13291328        m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
     
    13311330    }
    13321331
    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)
    13341333    {
    13351334        m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(pointer));
    13361335        return appendCallWithExceptionCheck(operation);
    13371336    }
    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)
    13391338    {
    13401339        m_jit.setupArgumentsWithExecState(arg1, arg2, TrustedImmPtr(uid));
    13411340        return appendCallWithExceptionCheck(operation);
    13421341    }
    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)
    13441343    {
    13451344        m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
    13461345        return appendCallWithExceptionCheck(operation);
    13471346    }
    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)
    13491348    {
    13501349        m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
     
    13521351    }
    13531352
    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)
    13551354    {
    13561355        m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
    13571356        return appendCallWithExceptionCheck(operation);
    13581357    }
    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)
    13601359    {
    13611360        m_jit.setupArgumentsWithExecState(arg1, arg2, arg3);
     
    13631362    }
    13641363
    1365     JITCompiler::Call callOperation(D_DFGOperation_EJ operation, FPRReg result, GPRReg arg1)
     1364    JITCompiler::Call callOperation(D_JITOperation_EJ operation, FPRReg result, GPRReg arg1)
    13661365    {
    13671366        m_jit.setupArgumentsWithExecState(arg1);
     
    13871386#endif
    13881387
    1389     JITCompiler::Call callOperation(Z_DFGOperation_D operation, GPRReg result, FPRReg arg1)
     1388    JITCompiler::Call callOperation(Z_JITOperation_D operation, GPRReg result, FPRReg arg1)
    13901389    {
    13911390        prepareForExternalCall();
     
    13951394        return call;
    13961395    }
    1397     JITCompiler::Call callOperation(J_DFGOperation_E operation, GPRReg resultTag, GPRReg resultPayload)
     1396    JITCompiler::Call callOperation(J_JITOperation_E operation, GPRReg resultTag, GPRReg resultPayload)
    13981397    {
    13991398        m_jit.setupArgumentsExecState();
    14001399        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14011400    }
    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)
    14031402    {
    14041403        m_jit.setupArgumentsWithExecState(TrustedImmPtr(pointer));
    14051404        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14061405    }
    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)
    14081407    {
    14091408        m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(pointer));
    14101409        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14111410    }
    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)
    14131412    {
    14141413        m_jit.setupArgumentsWithExecState(arg1);
    14151414        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14161415    }
    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)
    14181417    {
    14191418        m_jit.setupArgumentsWithExecState(TrustedImmPtr(uid));
    14201419        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14211420    }
    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)
    14231422    {
    14241423        m_jit.setupArgumentsWithExecState(arg1);
    14251424        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14261425    }
    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)
    14281427    {
    14291428        m_jit.setupArgumentsWithExecState(arg1, arg2);
    14301429        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14311430    }
    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)
    14331432    {
    14341433        m_jit.setupArgumentsWithExecState(arg1, arg2);
    14351434        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14361435    }
    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)
    14381437    {
    14391438        m_jit.setupArgumentsWithExecState(TrustedImmPtr(pointer), TrustedImmPtr(size));
    14401439        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14411440    }
    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)
    14431442    {
    14441443        m_jit.setupArgumentsWithExecState(TrustedImm32(startConstant), TrustedImm32(numConstants));
    14451444        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14461445    }
    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)
    14481447    {
    14491448        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, TrustedImmPtr(pointer));
    14501449        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14511450    }
    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)
    14531452    {
    14541453        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, arg2);
     
    14561455    }
    14571456
    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)
    14591458    {
    14601459        m_jit.setupArgumentsWithExecState(TrustedImmPtr(cell));
    14611460        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14621461    }
    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)
    14641463    {
    14651464        m_jit.setupArgumentsWithExecState(arg1, TrustedImmPtr(uid));
    14661465        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14671466    }
    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)
    14691468    {
    14701469        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, TrustedImmPtr(uid));
    14711470        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14721471    }
    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)
    14741473    {
    14751474        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, TrustedImm32(arg1Tag), TrustedImmPtr(uid));
    14761475        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14771476    }
    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)
    14791478    {
    14801479        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1, arg2);
    14811480        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14821481    }
    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)
    14841483    {
    14851484        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, arg2);
    14861485        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14871486    }
    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)
    14891488    {
    14901489        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, arg2);
    14911490        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14921491    }
    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)
    14941493    {
    14951494        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag);
    14961495        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    14971496    }
    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)
    14991498    {
    15001499        m_jit.setupArgumentsWithExecState(arg1);
    15011500        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    15021501    }
    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)
    15041503    {
    15051504        m_jit.setupArgumentsWithExecState(TrustedImm32(arg1));
    15061505        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    15071506    }
    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)
    15091508    {
    15101509        m_jit.setupArgumentsWithExecState(TrustedImm32(arg1), TrustedImmPtr(inlineCallFrame), arg2);
    15111510        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    15121511    }
    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)
    15141513    {
    15151514        m_jit.setupArgumentsWithExecState(TrustedImm32(arg1), arg2);
     
    15171516    }
    15181517
    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)
    15201519    {
    15211520        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG value.payloadGPR(), value.tagGPR(), TrustedImmPtr(index));
     
    15231522    }
    15241523
    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)
    15261525    {
    15271526        m_jit.setupArgumentsWithExecState(TrustedImmPtr(structure), arg2Payload, arg2Tag);
     
    15291528    }
    15301529
    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)
    15321531    {
    15331532        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag);
    15341533        return appendCallWithExceptionCheckSetResult(operation, result);
    15351534    }
    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)
    15371536    {
    15381537        m_jit.setupArguments(arg1Payload, arg1Tag);
    15391538        return appendCallSetResult(operation, result);
    15401539    }
    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)
    15421541    {
    15431542        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag);
     
    15451544    }
    15461545
    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)
    15481547    {
    15491548        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, SH4_32BIT_DUMMY_ARG arg2Payload, arg2Tag);
    15501549        return appendCallWithExceptionCheckSetResult(operation, result);
    15511550    }
    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)
    15531552    {
    15541553        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, SH4_32BIT_DUMMY_ARG arg2Payload, arg2Tag);
    15551554        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    15561555    }
    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)
    15581557    {
    15591558        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, SH4_32BIT_DUMMY_ARG imm, TrustedImm32(JSValue::Int32Tag));
    15601559        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    15611560    }
    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)
    15631562    {
    15641563        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG imm, TrustedImm32(JSValue::Int32Tag), SH4_32BIT_DUMMY_ARG arg2Payload, arg2Tag);
     
    15661565    }
    15671566
    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)
    15691568    {
    15701569        m_jit.setupArgumentsWithExecState(arg1, arg2Payload, arg2Tag);
    15711570        return appendCallWithExceptionCheckSetResult(operation, resultPayload, resultTag);
    15721571    }
    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)
    15741573    {
    15751574        m_jit.setupArgumentsWithExecState(arg1, arg2.payloadGPR(), arg2.tagGPR());
    15761575        return appendCallWithExceptionCheckSetResult(operation, result.payloadGPR(), result.tagGPR());
    15771576    }
    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)
    15791578    {
    15801579        m_jit.setupArgumentsWithExecState(arg1, arg2);
     
    15821581    }
    15831582
    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)
    15851584    {
    15861585        m_jit.setupArgumentsWithExecState(arg1, arg2, EABI_32BIT_DUMMY_ARG arg3);
     
    15881587    }
    15891588
    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)
    15911590    {
    15921591        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, arg2, TrustedImmPtr(pointer));
    15931592        return appendCallWithExceptionCheck(operation);
    15941593    }
    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)
    15961595    {
    15971596        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag, arg2, TrustedImmPtr(uid));
    15981597        return appendCallWithExceptionCheck(operation);
    15991598    }
    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)
    16011600    {
    16021601        m_jit.setupArgumentsWithExecState(arg1, arg2Payload, arg2Tag, arg3Payload, arg3Tag);
     
    16041603    }
    16051604
    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)
    16071606    {
    16081607        m_jit.setupArgumentsWithExecState(arg1, arg2, EABI_32BIT_DUMMY_ARG SH4_32BIT_DUMMY_ARG arg3Payload, arg3Tag);
     
    16101609    }
    16111610
    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)
    16131612    {
    16141613        m_jit.setupArgumentsWithExecState(arg1, arg2, EABI_32BIT_DUMMY_ARG SH4_32BIT_DUMMY_ARG arg3Payload, arg3Tag);
    16151614        return appendCallWithExceptionCheck(operation);
    16161615    }
    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)
    16181617    {
    16191618        m_jit.setupArgumentsWithExecState(arg1, arg2, EABI_32BIT_DUMMY_ARG SH4_32BIT_DUMMY_ARG arg3Payload, arg3Tag);
     
    16211620    }
    16221621
    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)
    16241623    {
    16251624        m_jit.setupArgumentsWithExecState(EABI_32BIT_DUMMY_ARG arg1Payload, arg1Tag);
     
    19241923    }
    19251924   
    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);
    19281927    void compilePeepHoleInt32Branch(Node*, Node* branchNode, JITCompiler::RelationalCondition);
    19291928    void compilePeepHoleInt52Branch(Node*, Node* branchNode, JITCompiler::RelationalCondition);
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp

    r156300 r156490  
    3333#include "DFGAbstractInterpreterInlines.h"
    3434#include "DFGCallArrayAllocatorSlowPathGenerator.h"
     35#include "DFGOperations.h"
    3536#include "DFGSlowPathGenerator.h"
    3637#include "JSActivation.h"
     
    262263
    263264    JITCompiler::Label doneLabel = m_jit.label();
    264     V_DFGOperation_EJCI optimizedCall;
     265    V_JITOperation_EJCI optimizedCall;
    265266    if (m_jit.strictModeFor(m_currentNode->codeOrigin)) {
    266267        if (putKind == Direct)
     
    441442}
    442443
    443 void SpeculativeJIT::nonSpeculativePeepholeBranch(Node* node, Node* branchNode, MacroAssembler::RelationalCondition cond, S_DFGOperation_EJJ helperFunction)
     444void SpeculativeJIT::nonSpeculativePeepholeBranch(Node* node, Node* branchNode, MacroAssembler::RelationalCondition cond, S_JITOperation_EJJ helperFunction)
    444445{
    445446    BasicBlock* taken = branchNode->takenBlock();
     
    513514template<typename JumpType>
    514515class CompareAndBoxBooleanSlowPathGenerator
    515     : public CallSlowPathGenerator<JumpType, S_DFGOperation_EJJ, GPRReg> {
     516    : public CallSlowPathGenerator<JumpType, S_JITOperation_EJJ, GPRReg> {
    516517public:
    517518    CompareAndBoxBooleanSlowPathGenerator(
    518519        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,
    520521        GPRReg arg2Tag, GPRReg arg2Payload)
    521         : CallSlowPathGenerator<JumpType, S_DFGOperation_EJJ, GPRReg>(
     522        : CallSlowPathGenerator<JumpType, S_JITOperation_EJJ, GPRReg>(
    522523            from, jit, function, NeedToSpill, result)
    523524        , m_arg1Tag(arg1Tag)
     
    547548};
    548549
    549 void SpeculativeJIT::nonSpeculativeNonPeepholeCompare(Node* node, MacroAssembler::RelationalCondition cond, S_DFGOperation_EJJ helperFunction)
     550void SpeculativeJIT::nonSpeculativeNonPeepholeCompare(Node* node, MacroAssembler::RelationalCondition cond, S_JITOperation_EJJ helperFunction)
    550551{
    551552    JSValueOperand arg1(this, node->child1());
     
    36073608        m_jit.move(thisValuePayloadGPR, tempGPR);
    36083609        m_jit.move(thisValueTagGPR, tempTagGPR);
    3609         J_DFGOperation_EJ function;
     3610        J_JITOperation_EJ function;
    36103611        if (m_jit.graph().executableFor(node->codeOrigin)->isStrictMode())
    36113612            function = operationToThisStrict;
  • trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp

    r156482 r156490  
    3333#include "DFGAbstractInterpreterInlines.h"
    3434#include "DFGCallArrayAllocatorSlowPathGenerator.h"
     35#include "DFGOperations.h"
    3536#include "DFGSlowPathGenerator.h"
    3637#include "JSCJSValueInlines.h"
     
    254255    JITCompiler::Label doneLabel = m_jit.label();
    255256   
    256     V_DFGOperation_EJCI optimizedCall;
     257    V_JITOperation_EJCI optimizedCall;
    257258    if (m_jit.strictModeFor(m_currentNode->codeOrigin)) {
    258259        if (putKind == Direct)
     
    429430}
    430431
    431 void SpeculativeJIT::nonSpeculativePeepholeBranch(Node* node, Node* branchNode, MacroAssembler::RelationalCondition cond, S_DFGOperation_EJJ helperFunction)
     432void SpeculativeJIT::nonSpeculativePeepholeBranch(Node* node, Node* branchNode, MacroAssembler::RelationalCondition cond, S_JITOperation_EJJ helperFunction)
    432433{
    433434    BasicBlock* taken = branchNode->takenBlock();
     
    499500template<typename JumpType>
    500501class CompareAndBoxBooleanSlowPathGenerator
    501     : public CallSlowPathGenerator<JumpType, S_DFGOperation_EJJ, GPRReg> {
     502    : public CallSlowPathGenerator<JumpType, S_JITOperation_EJJ, GPRReg> {
    502503public:
    503504    CompareAndBoxBooleanSlowPathGenerator(
    504505        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>(
    507508            from, jit, function, NeedToSpill, result)
    508509        , m_arg1(arg1)
     
    526527};
    527528
    528 void SpeculativeJIT::nonSpeculativeNonPeepholeCompare(Node* node, MacroAssembler::RelationalCondition cond, S_DFGOperation_EJJ helperFunction)
     529void SpeculativeJIT::nonSpeculativeNonPeepholeCompare(Node* node, MacroAssembler::RelationalCondition cond, S_JITOperation_EJJ helperFunction)
    529530{
    530531    JSValueOperand arg1(this, node->child1());
     
    39033904            TrustedImm32(FinalObjectType)));
    39043905        m_jit.move(thisValueGPR, tempGPR);
    3905         J_DFGOperation_EJ function;
     3906        J_JITOperation_EJ function;
    39063907        if (m_jit.graph().executableFor(node->codeOrigin)->isStrictMode())
    39073908            function = operationToThisStrict;
  • trunk/Source/JavaScriptCore/dfg/DFGThunks.cpp

    r156237 r156490  
    9494}
    9595
    96 inline void emitPointerValidation(CCallHelpers& jit, GPRReg pointerGPR)
    97 {
    98 #if !ASSERT_DISABLED
    99     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 #else
    106     UNUSED_PARAM(jit);
    107     UNUSED_PARAM(pointerGPR);
    108 #endif
    109 }
    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 the
    116     // linking helper (C++ code) decided to throw an exception instead. We will
    117     // 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 we
    119     // 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, so
    121     // 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 #else
    131     jit.peek(GPRInfo::nonPreservedNonReturnGPR, JITSTACKFRAME_ARGS_INDEX);
    132 #endif
    133     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 #else
    158     jit.poke(GPRInfo::nonPreservedNonReturnGPR, JITSTACKFRAME_ARGS_INDEX);
    159 #endif
    160     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 hence
    189     // save the return address to the call frame while we make a C++ function call
    190     // to perform linking and lazy compilation if necessary. We expect the callee
    191     // to be in nonArgGPR0/nonArgGPR1 (payload/tag), the call frame to have already
    192     // been adjusted, nonPreservedNonReturnGPR holds the exception handler index,
    193     // and all other registers to be available for use. We use JITStackFrame::args
    194     // 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 for
    217 // 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 hence
    232     // jump to the callee, or save the return address to the call frame while we
    233     // 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 #else
    247     slowCase.append(
    248         jit.branch32(
    249             CCallHelpers::NotEqual, GPRInfo::nonArgGPR1,
    250             CCallHelpers::TrustedImm32(JSValue::CellTag)));
    251 #endif
    252     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 fast
    272     // 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 #else
    284     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 #endif
    297    
    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 
    32896} } // namespace JSC::DFG
    32997
  • trunk/Source/JavaScriptCore/dfg/DFGThunks.h

    r156237 r156490  
    4141MacroAssemblerCodeRef osrExitGenerationThunkGenerator(VM*);
    4242
    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 
    5343} } // namespace JSC::DFG
    5444
  • trunk/Source/JavaScriptCore/ftl/FTLIntrinsicRepository.h

    r156237 r156490  
    4949
    5050#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))
    5757
    5858class IntrinsicRepository : public CommonValues {
     
    8080   
    8181#define FUNCTION_TYPE_RESOLVER(typeName, type) \
    82     LType operationType(DFG::typeName)         \
     82    LType operationType(JSC::typeName)         \
    8383    {                                          \
    8484        return typeName();                     \
  • trunk/Source/JavaScriptCore/ftl/FTLLowerDFGToLLVM.cpp

    r156482 r156490  
    19951995        // https://bugs.webkit.org/show_bug.cgi?id=113621
    19961996       
    1997         J_DFGOperation_E function =
     1997        J_JITOperation_E function =
    19981998            m_node->op() == Call ? operationFTLCall : operationFTLConstruct;
    19991999       
  • trunk/Source/JavaScriptCore/ftl/FTLOSRExitCompiler.h

    r156237 r156490  
    3838// jump to.
    3939extern "C" {
    40 void* DFG_OPERATION compileFTLOSRExit(ExecState*, unsigned exitID) WTF_INTERNAL;
     40void* JIT_OPERATION compileFTLOSRExit(ExecState*, unsigned exitID) WTF_INTERNAL;
    4141}
    4242
  • trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h

    r156482 r156490  
    414414    }
    415415
     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
    416431    Vector<BytecodeAndMachineOffset>& decodedCodeMapFor(CodeBlock*);
    417432   
  • trunk/Source/JavaScriptCore/jit/JIT.cpp

    r156376 r156490  
    798798               || callLinkInfo->callType == CallLinkInfo::CallVarargs);
    799799        if (callLinkInfo->callType == CallLinkInfo::Call) {
    800             repatchBuffer.relink(callLinkInfo->callReturnLocation, vm->getCTIStub(linkClosureCallGenerator).code());
     800            repatchBuffer.relink(callLinkInfo->callReturnLocation, vm->getCTIStub(oldStyleLinkClosureCallGenerator).code());
    801801            return;
    802802        }
    803803
    804         repatchBuffer.relink(callLinkInfo->callReturnLocation, vm->getCTIStub(virtualCallGenerator).code());
     804        repatchBuffer.relink(callLinkInfo->callReturnLocation, vm->getCTIStub(oldStyleVirtualCallGenerator).code());
    805805        return;
    806806    }
    807807
    808808    ASSERT(kind == CodeForConstruct);
    809     repatchBuffer.relink(callLinkInfo->callReturnLocation, vm->getCTIStub(virtualConstructGenerator).code());
     809    repatchBuffer.relink(callLinkInfo->callReturnLocation, vm->getCTIStub(oldStyleVirtualConstructGenerator).code());
    810810}
    811811
     
    814814    RepatchBuffer repatchBuffer(callerCodeBlock);
    815815
    816     repatchBuffer.relink(callLinkInfo->callReturnLocation, callerCodeBlock->vm()->getCTIStub(virtualCallGenerator).code());
     816    repatchBuffer.relink(callLinkInfo->callReturnLocation, callerCodeBlock->vm()->getCTIStub(oldStyleVirtualCallGenerator).code());
    817817}
    818818
  • trunk/Source/JavaScriptCore/jit/JITCall.cpp

    r156482 r156490  
    147147
    148148    emitGetFromCallFrameHeader64(JSStack::Callee, regT0);
    149     emitNakedCall(m_vm->getCTIStub(virtualCallGenerator).code());
     149    emitNakedCall(m_vm->getCTIStub(oldStyleVirtualCallGenerator).code());
    150150
    151151    sampleCodeBlock(m_codeBlock);
     
    234234    linkSlowCase(iter);
    235235   
    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());
    237237
    238238    sampleCodeBlock(m_codeBlock);
     
    264264    patchBuffer.link(call, FunctionPtr(codePtr.executableAddress()));
    265265    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()));
    267267   
    268268    RefPtr<ClosureCallStubRoutine> stubRoutine = adoptRef(new ClosureCallStubRoutine(
     
    282282        RepatchBuffer::startOfBranchPtrWithPatchOnRegister(callLinkInfo->hotPathBegin),
    283283        CodeLocationLabel(stubRoutine->code().code()));
    284     repatchBuffer.relink(callLinkInfo->callReturnLocation, m_vm->getCTIStub(virtualCallGenerator).code());
     284    repatchBuffer.relink(callLinkInfo->callReturnLocation, m_vm->getCTIStub(oldStyleVirtualCallGenerator).code());
    285285   
    286286    callLinkInfo->stub = stubRoutine.release();
  • trunk/Source/JavaScriptCore/jit/JITCall32_64.cpp

    r156237 r156490  
    218218
    219219    emitLoad(JSStack::Callee, regT1, regT0);
    220     emitNakedCall(m_vm->getCTIStub(virtualCallGenerator).code());
     220    emitNakedCall(m_vm->getCTIStub(oldStyleVirtualCallGenerator).code());
    221221
    222222    sampleCodeBlock(m_codeBlock);
     
    307307    linkSlowCase(iter);
    308308   
    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());
    310310
    311311    sampleCodeBlock(m_codeBlock);
     
    336336    patchBuffer.link(call, FunctionPtr(codePtr.executableAddress()));
    337337    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()));
    339339   
    340340    RefPtr<ClosureCallStubRoutine> stubRoutine = adoptRef(new ClosureCallStubRoutine(
     
    354354        RepatchBuffer::startOfBranchPtrWithPatchOnRegister(callLinkInfo->hotPathBegin),
    355355        CodeLocationLabel(stubRoutine->code().code()));
    356     repatchBuffer.relink(callLinkInfo->callReturnLocation, m_vm->getCTIStub(virtualCallGenerator).code());
     356    repatchBuffer.relink(callLinkInfo->callReturnLocation, m_vm->getCTIStub(oldStyleVirtualCallGenerator).code());
    357357   
    358358    callLinkInfo->stub = stubRoutine.release();
  • trunk/Source/JavaScriptCore/jit/JITOperationWrappers.h

    r156236 r156490  
    2727#define JITOperationWrappers_h
    2828
     29#include "JITOperations.h"
    2930#include <wtf/Compiler.h>
    3031#include <wtf/InlineASM.h>
     32
     33#if COMPILER(MSVC)
     34#include <intrin.h>
     35#endif
    3136
    3237namespace JSC {
     
    5459        "jmp " LOCAL_REFERENCE(function##WithReturnAddress) "\n" \
    5560    );
    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)
    6066
    6167#elif COMPILER(GCC) && CPU(X86)
     
    7177        "jmp " LOCAL_REFERENCE(function##WithReturnAddress) "\n" \
    7278    );
    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)
    7784
    7885#elif COMPILER(GCC) && CPU(ARM_THUMB2)
    7986
    80 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \
     87#define _P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \
    8188    asm ( \
    8289    ".text" "\n" \
     
    9198    );
    9299
    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) \
    94104    asm ( \
    95105    ".text" "\n" \
     
    114124#endif
    115125
    116 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \
     126#define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \
    117127    asm ( \
    118128    ".text" "\n" \
     
    127137    );
    128138
    129 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \
     139#define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \
    130140    asm ( \
    131141    ".text" "\n" \
     
    142152#elif COMPILER(GCC) && CPU(ARM_TRADITIONAL)
    143153
    144 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \
     154#define _P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \
    145155    asm ( \
    146156    ".text" "\n" \
     
    153163    );
    154164
    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) \
    156169    asm ( \
    157170    ".text" "\n" \
     
    174187#endif
    175188
    176 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \
     189#define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \
    177190    asm ( \
    178191    ".text" "\n" \
     
    185198    );
    186199
    187 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \
     200#define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \
    188201    asm ( \
    189202    ".text" "\n" \
     
    198211#elif COMPILER(GCC) && CPU(MIPS)
    199212
    200 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \
     213#define _P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \
    201214    asm( \
    202215    ".text" "\n" \
     
    209222    );
    210223
    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) \
    212228    asm( \
    213229    ".text" "\n" \
     
    220236    );
    221237
    222 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \
     238#define _J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \
    223239    asm( \
    224240    ".text" "\n" \
     
    231247    );
    232248
    233 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \
     249#define _V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \
    234250    asm( \
    235251    ".text" "\n" \
     
    246262#define SH4_SCRATCH_REGISTER "r11"
    247263
    248 #define FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \
     264#define _P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \
    249265    asm( \
    250266    ".text" "\n" \
     
    257273    );
    258274
    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) \
    260279    asm( \
    261280    ".text" "\n" \
     
    286305    );
    287306
    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())); }
    290326
    291327#endif
     
    293329#define P_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \
    294330void* 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)
    296332
    297333#define J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_E(function) \
    298334EncodedJSValue 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)
    300336
    301337#define J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_ECI(function) \
    302338EncodedJSValue 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)
    304340
    305341#define J_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJI(function) \
    306342EncodedJSValue 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)
    308344
    309345#define V_FUNCTION_WRAPPER_WITH_RETURN_ADDRESS_EJCI(function) \
    310346void 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)
    312348
    313349} // namespace JSC
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r156236 r156490  
    588588}
    589589
    590 JITHandlerEncoded JIT_OPERATION lookupExceptionHandler(ExecState* exec, uint32_t callIndex)
     590JITHandlerEncoded JIT_OPERATION lookupExceptionHandler(ExecState* exec)
    591591{
    592592    VM* vm = &exec->vm();
     
    596596    ASSERT(exceptionValue);
    597597   
    598     unsigned vPCIndex = exec->codeBlock()->bytecodeOffsetForCallAtIndex(callIndex);
    599     ExceptionHandler handler = genericUnwind(vm, exec, exceptionValue, vPCIndex);
     598    ExceptionHandler handler = genericUnwind(vm, exec, exceptionValue);
    600599    ASSERT(handler.catchRoutine);
    601600    return dfgHandlerEncoded(handler.callFrame, handler.catchRoutine);
    602601}
    603602
    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 
    621603} // extern "C"
    622604
     605// Note: getHostCallReturnValueWithExecState() needs to be placed before the
     606// definition of getHostCallReturnValue() below because the Windows build
     607// requires it.
     608extern "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)
     616asm (
     617".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
     618HIDE_SYMBOL(getHostCallReturnValue) "\n"
     619SYMBOL_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)
     626asm (
     627".text" "\n" \
     628".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
     629HIDE_SYMBOL(getHostCallReturnValue) "\n"
     630SYMBOL_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)
     637asm (
     638".text" "\n"
     639".align 2" "\n"
     640".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
     641HIDE_SYMBOL(getHostCallReturnValue) "\n"
     642".thumb" "\n"
     643".thumb_func " THUMB_FUNC_PARAM(getHostCallReturnValue) "\n"
     644SYMBOL_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)
     651asm (
     652".text" "\n"
     653".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
     654HIDE_SYMBOL(getHostCallReturnValue) "\n"
     655INLINE_ARM_FUNCTION(getHostCallReturnValue)
     656SYMBOL_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)
     663asm (
     664".text" "\n"
     665".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
     666HIDE_SYMBOL(getHostCallReturnValue) "\n"
     667SYMBOL_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)
     675asm (
     676".text" "\n"
     677".globl " SYMBOL_STRING(getHostCallReturnValue) "\n"
     678HIDE_SYMBOL(getHostCallReturnValue) "\n"
     679SYMBOL_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)
     691extern "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
    623703} // namespace JSC
    624704
  • trunk/Source/JavaScriptCore/jit/JITOperations.h

    r156236 r156490  
    171171}
    172172#endif
    173 JITHandlerEncoded JIT_OPERATION lookupExceptionHandler(ExecState*, uint32_t) WTF_INTERNAL;
    174 JITHandlerEncoded JIT_OPERATION lookupExceptionHandlerInStub(ExecState*, StructureStubInfo*) WTF_INTERNAL;
     173JITHandlerEncoded JIT_OPERATION lookupExceptionHandler(ExecState*) WTF_INTERNAL;
    175174
    176175EncodedJSValue JIT_OPERATION operationGetById(ExecState*, EncodedJSValue, StringImpl*) WTF_INTERNAL;
  • trunk/Source/JavaScriptCore/jit/Repatch.cpp

    r156236 r156490  
    514514            success = stubJit.emitExceptionCheck(CCallHelpers::InvertedExceptionCheck);
    515515           
    516             stubJit.setupArgumentsWithExecState(
    517                 MacroAssembler::TrustedImmPtr(&stubInfo));
     516            stubJit.setupArgumentsExecState();
    518517            handlerCall = stubJit.call();
    519518            stubJit.jump(GPRInfo::returnValueGPR2);
     
    550549        if (!isDirect) {
    551550            patchBuffer.link(operationCall, operationFunction);
    552             patchBuffer.link(handlerCall, lookupExceptionHandlerInStub);
     551            patchBuffer.link(handlerCall, lookupExceptionHandler);
    553552        }
    554553       
  • trunk/Source/JavaScriptCore/jit/ThunkGenerators.cpp

    r156237 r156490  
    2828
    2929#include "CodeBlock.h"
     30#include "JITOperations.h"
    3031#include "JSStack.h"
    3132#include "Operations.h"
     
    3940namespace JSC {
    4041
    41 static JSInterfaceJIT::Call generateSlowCaseFor(VM* vm, JSInterfaceJIT& jit)
     42static JSInterfaceJIT::Call oldStyleGenerateSlowCaseFor(VM* vm, JSInterfaceJIT& jit)
    4243{
    4344    jit.emitGetFromCallFrameHeaderPtr(JSStack::CallerFrame, JSInterfaceJIT::regT2);
     
    6061}
    6162
    62 static MacroAssemblerCodeRef linkForGenerator(VM* vm, FunctionPtr lazyLink, FunctionPtr notJSFunction, const char* name)
     63static MacroAssemblerCodeRef oldStyleLinkForGenerator(VM* vm, FunctionPtr lazyLink, FunctionPtr notJSFunction, const char* name)
    6364{
    6465    JSInterfaceJIT jit(vm);
     
    8990   
    9091    slowCase.link(&jit);
    91     JSInterfaceJIT::Call callNotJSFunction = generateSlowCaseFor(vm, jit);
     92    JSInterfaceJIT::Call callNotJSFunction = oldStyleGenerateSlowCaseFor(vm, jit);
    9293   
    9394    LinkBuffer patchBuffer(*vm, &jit, GLOBAL_THUNK_ID);
     
    9899}
    99100
    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)
     101MacroAssemblerCodeRef oldStyleLinkCallGenerator(VM* vm)
     102{
     103    return oldStyleLinkForGenerator(vm, FunctionPtr(cti_vm_lazyLinkCall), FunctionPtr(cti_op_call_NotJSFunction), "call");
     104}
     105
     106MacroAssemblerCodeRef oldStyleLinkConstructGenerator(VM* vm)
     107{
     108    return oldStyleLinkForGenerator(vm, FunctionPtr(cti_vm_lazyLinkConstruct), FunctionPtr(cti_op_construct_NotJSConstruct), "construct");
     109}
     110
     111MacroAssemblerCodeRef oldStyleLinkClosureCallGenerator(VM* vm)
     112{
     113    return oldStyleLinkForGenerator(vm, FunctionPtr(cti_vm_lazyLinkClosureCall), FunctionPtr(cti_op_call_NotJSFunction), "closure call");
     114}
     115
     116static MacroAssemblerCodeRef oldStyleVirtualForGenerator(VM* vm, FunctionPtr compile, FunctionPtr notJSFunction, const char* name, CodeSpecializationKind kind)
    116117{
    117118    JSInterfaceJIT jit(vm);
     
    149150   
    150151    slowCase.link(&jit);
    151     JSInterfaceJIT::Call callNotJSFunction = generateSlowCaseFor(vm, jit);
     152    JSInterfaceJIT::Call callNotJSFunction = oldStyleGenerateSlowCaseFor(vm, jit);
    152153   
    153154    LinkBuffer patchBuffer(*vm, &jit, GLOBAL_THUNK_ID);
     
    158159}
    159160
    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);
     161MacroAssemblerCodeRef oldStyleVirtualCallGenerator(VM* vm)
     162{
     163    return oldStyleVirtualForGenerator(vm, FunctionPtr(cti_op_call_jitCompile), FunctionPtr(cti_op_call_NotJSFunction), "call", CodeForCall);
     164}
     165
     166MacroAssemblerCodeRef oldStyleVirtualConstructGenerator(VM* vm)
     167{
     168    return oldStyleVirtualForGenerator(vm, FunctionPtr(cti_op_construct_jitCompile), FunctionPtr(cti_op_construct_NotJSConstruct), "construct", CodeForConstruct);
     169}
     170
     171inline 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
     186MacroAssemblerCodeRef 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
     219static 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
     260static 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
     281MacroAssemblerCodeRef linkCallThunkGenerator(VM* vm)
     282{
     283    return linkForThunkGenerator(vm, CodeForCall);
     284}
     285
     286MacroAssemblerCodeRef 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.
     293MacroAssemblerCodeRef 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
     303static 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
     393MacroAssemblerCodeRef virtualCallThunkGenerator(VM* vm)
     394{
     395    return virtualForThunkGenerator(vm, CodeForCall);
     396}
     397
     398MacroAssemblerCodeRef virtualConstructThunkGenerator(VM* vm)
     399{
     400    return virtualForThunkGenerator(vm, CodeForConstruct);
    168401}
    169402
  • trunk/Source/JavaScriptCore/jit/ThunkGenerators.h

    r156237 r156490  
    3232namespace JSC {
    3333
    34 MacroAssemblerCodeRef linkCallGenerator(VM*);
    35 MacroAssemblerCodeRef linkConstructGenerator(VM*);
    36 MacroAssemblerCodeRef linkClosureCallGenerator(VM*);
    37 MacroAssemblerCodeRef virtualCallGenerator(VM*);
    38 MacroAssemblerCodeRef virtualConstructGenerator(VM*);
     34MacroAssemblerCodeRef oldStyleLinkCallGenerator(VM*);
     35MacroAssemblerCodeRef oldStyleLinkConstructGenerator(VM*);
     36MacroAssemblerCodeRef oldStyleLinkClosureCallGenerator(VM*);
     37MacroAssemblerCodeRef oldStyleVirtualCallGenerator(VM*);
     38MacroAssemblerCodeRef oldStyleVirtualConstructGenerator(VM*);
     39
     40MacroAssemblerCodeRef throwExceptionFromCallSlowPathGenerator(VM*);
     41
     42MacroAssemblerCodeRef linkCallThunkGenerator(VM*);
     43MacroAssemblerCodeRef linkConstructThunkGenerator(VM*);
     44
     45MacroAssemblerCodeRef linkClosureCallThunkGenerator(VM*);
     46
     47MacroAssemblerCodeRef virtualCallThunkGenerator(VM*);
     48MacroAssemblerCodeRef virtualConstructThunkGenerator(VM*);
     49
    3950MacroAssemblerCodeRef stringLengthTrampolineGenerator(VM*);
    4051MacroAssemblerCodeRef nativeCallGenerator(VM*);
Note: See TracChangeset for help on using the changeset viewer.