Ignore:
Timestamp:
Sep 21, 2013, 4:10:45 PM (12 years ago)
Author:
[email protected]
Message:

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

Rubber stamped by Sam Weinig.

We want to get rid of the baseline JIT's inline caching machinery and have it use the
DFG's instead. But before we do that we need to move the DFG's inline caching machine
out from behind its ENABLE(DFG_JIT) guards and make it available to the whole system.
This patch does that:

  • dfg/DFGRepatch becomes jit/Repatch.


  • The thunks used by the DFG IC go into jit/ThunkGenerators, instead of dfg/DFGThunks.


  • The operations used by the DFG IC go into jit/JITOperations, instead of dfg/DFGOperations.


  • The old JIT's thunk generators for calls are renamed to reduce confusion. Previously it was easy to know which generators belong to which JIT because the old JIT used JSC::virtualCallBlah and the DFG used JSC::DFG::virtualCallBlah, but that's not the case anymore. Note that the old JIT's thunk generators will die in a future patch.


No functional changes beyond those moves.

  • 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):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::writeBarrier):

  • jit/JIT.cpp:

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

  • jit/JITCall.cpp:

(JSC::JIT::compileCallEval):
(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: Added.
  • jit/JITOperations.cpp: Added.
  • jit/JITOperations.h: Added.
  • jit/RegisterSet.h: Added.

(JSC::RegisterSet::RegisterSet):
(JSC::RegisterSet::asPOD):
(JSC::RegisterSet::copyInfo):
(JSC::RegisterSet::set):
(JSC::RegisterSet::setGPRByIndex):
(JSC::RegisterSet::clear):
(JSC::RegisterSet::get):
(JSC::RegisterSet::getGPRByIndex):
(JSC::RegisterSet::getFreeGPR):
(JSC::RegisterSet::setFPRByIndex):
(JSC::RegisterSet::getFPRByIndex):
(JSC::RegisterSet::setByIndex):
(JSC::RegisterSet::getByIndex):
(JSC::RegisterSet::numberOfSetGPRs):
(JSC::RegisterSet::numberOfSetFPRs):
(JSC::RegisterSet::numberOfSetRegisters):
(JSC::RegisterSet::setBit):
(JSC::RegisterSet::clearBit):
(JSC::RegisterSet::getBit):

  • jit/Repatch.cpp: Added.

(JSC::repatchCall):
(JSC::repatchByIdSelfAccess):
(JSC::addStructureTransitionCheck):
(JSC::replaceWithJump):
(JSC::emitRestoreScratch):
(JSC::linkRestoreScratch):
(JSC::generateProtoChainAccessStub):
(JSC::tryCacheGetByID):
(JSC::repatchGetByID):
(JSC::getPolymorphicStructureList):
(JSC::patchJumpToGetByIdStub):
(JSC::tryBuildGetByIDList):
(JSC::buildGetByIDList):
(JSC::appropriateGenericPutByIdFunction):
(JSC::appropriateListBuildingPutByIdFunction):
(JSC::emitPutReplaceStub):
(JSC::emitPutTransitionStub):
(JSC::tryCachePutByID):
(JSC::repatchPutByID):
(JSC::tryBuildPutByIdList):
(JSC::buildPutByIdList):
(JSC::tryRepatchIn):
(JSC::repatchIn):
(JSC::linkSlowFor):
(JSC::linkFor):
(JSC::linkClosureCall):
(JSC::resetGetByID):
(JSC::resetPutByID):
(JSC::resetIn):

  • jit/Repatch.h: Added.

(JSC::resetGetByID):
(JSC::resetPutByID):
(JSC::resetIn):

  • jit/ScratchRegisterAllocator.h: Added.

(JSC::ScratchRegisterAllocator::ScratchRegisterAllocator):
(JSC::ScratchRegisterAllocator::lock):
(JSC::ScratchRegisterAllocator::allocateScratch):
(JSC::ScratchRegisterAllocator::allocateScratchGPR):
(JSC::ScratchRegisterAllocator::allocateScratchFPR):
(JSC::ScratchRegisterAllocator::didReuseRegisters):
(JSC::ScratchRegisterAllocator::preserveReusedRegistersByPushing):
(JSC::ScratchRegisterAllocator::restoreReusedRegistersByPopping):
(JSC::ScratchRegisterAllocator::desiredScratchBufferSize):
(JSC::ScratchRegisterAllocator::preserveUsedRegistersToScratchBuffer):
(JSC::ScratchRegisterAllocator::restoreUsedRegistersFromScratchBuffer):

  • 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:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGOperations.cpp

    r156124 r156235  
    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, uint32_t callIndex)
    1908 {
    1909     VM* vm = &exec->vm();
    1910     NativeCallFrameTracer tracer(vm, exec);
    1911 
    1912     JSValue exceptionValue = exec->exception();
    1913     ASSERT(exceptionValue);
    1914    
    1915     unsigned vPCIndex = exec->codeBlock()->bytecodeOffsetForCallAtIndex(callIndex);
    1916     ExceptionHandler handler = genericUnwind(vm, exec, exceptionValue, vPCIndex);
    1917     ASSERT(handler.catchRoutine);
    1918     return dfgHandlerEncoded(handler.callFrame, handler.catchRoutine);
    1919 }
    1920 
    1921 DFGHandlerEncoded DFG_OPERATION lookupExceptionHandlerInStub(ExecState* exec, StructureStubInfo* stubInfo)
    1922 {
    1923     VM* vm = &exec->vm();
    1924     NativeCallFrameTracer tracer(vm, exec);
    1925 
    1926     JSValue exceptionValue = exec->exception();
    1927     ASSERT(exceptionValue);
    1928    
    1929     CodeOrigin codeOrigin = stubInfo->codeOrigin;
    1930     while (codeOrigin.inlineCallFrame)
    1931         codeOrigin = codeOrigin.inlineCallFrame->caller;
    1932    
    1933     ExceptionHandler handler = genericUnwind(vm, exec, exceptionValue, codeOrigin.bytecodeIndex);
    1934     ASSERT(handler.catchRoutine);
    1935     return dfgHandlerEncoded(handler.callFrame, handler.catchRoutine);
    1936 }
    1937 
    1938 size_t DFG_OPERATION dfgConvertJSValueToInt32(ExecState* exec, EncodedJSValue value)
     1082size_t JIT_OPERATION dfgConvertJSValueToInt32(ExecState* exec, EncodedJSValue value)
    19391083{
    19401084    VM* vm = &exec->vm();
     
    19451089}
    19461090
    1947 size_t DFG_OPERATION dfgConvertJSValueToBoolean(ExecState* exec, EncodedJSValue encodedOp)
     1091size_t JIT_OPERATION dfgConvertJSValueToBoolean(ExecState* exec, EncodedJSValue encodedOp)
    19481092{
    19491093    VM* vm = &exec->vm();
     
    19531097}
    19541098
    1955 void DFG_OPERATION debugOperationPrintSpeculationFailure(ExecState* exec, void* debugInfoRaw, void* scratch)
     1099void JIT_OPERATION debugOperationPrintSpeculationFailure(ExecState* exec, void* debugInfoRaw, void* scratch)
    19561100{
    19571101    VM* vm = &exec->vm();
     
    19911135}
    19921136
    1993 extern "C" void DFG_OPERATION triggerReoptimizationNow(CodeBlock* codeBlock)
     1137extern "C" void JIT_OPERATION triggerReoptimizationNow(CodeBlock* codeBlock)
    19941138{
    19951139    // It's sort of preferable that we don't GC while in here. Anyways, doing so wouldn't
     
    20351179
    20361180#if ENABLE(FTL_JIT)
    2037 void DFG_OPERATION triggerTierUpNow(ExecState* exec)
     1181void JIT_OPERATION triggerTierUpNow(ExecState* exec)
    20381182{
    20391183    VM* vm = &exec->vm();
     
    20971241}
    20981242
    2099 char* DFG_OPERATION triggerOSREntryNow(
     1243char* JIT_OPERATION triggerOSREntryNow(
    21001244    ExecState* exec, int32_t bytecodeIndex, int32_t streamIndex)
    21011245{
     
    22161360// FIXME: Make calls work well. Currently they're a pure regression.
    22171361// https://bugs.webkit.org/show_bug.cgi?id=113621
    2218 EncodedJSValue DFG_OPERATION operationFTLCall(ExecState* exec)
     1362EncodedJSValue JIT_OPERATION operationFTLCall(ExecState* exec)
    22191363{
    22201364    ExecState* callerExec = exec->callerFrame();
     
    22361380// FIXME: Make calls work well. Currently they're a pure regression.
    22371381// https://bugs.webkit.org/show_bug.cgi?id=113621
    2238 EncodedJSValue DFG_OPERATION operationFTLConstruct(ExecState* exec)
     1382EncodedJSValue JIT_OPERATION operationFTLConstruct(ExecState* exec)
    22391383{
    22401384    ExecState* callerExec = exec->callerFrame();
Note: See TracChangeset for help on using the changeset viewer.