Changeset 190230 in webkit


Ignore:
Timestamp:
Sep 24, 2015 5:17:16 PM (9 years ago)
Author:
mark.lam@apple.com
Message:

Remove the use of "Immediate" in JIT function names.
https://bugs.webkit.org/show_bug.cgi?id=149542

Reviewed by Geoffrey Garen.

We will rename the following:

isOperandConstantImmediateDouble => isOperandConstantDouble
isOperandConstantImmediateInt => isOperandConstantInt
isOperandConstantImmediateChar => isOperandConstantChar

getOperandConstantImmediateInt => getOperandConstantInt
getConstantOperandImmediateInt => getOperandConstantInt

emitJumpIfImmediateInteger => emitJumpIfInt
emitJumpIfNotImmediateInteger => emitJumpIfNotInt
emitJumpIfNotImmediateIntegers => emitJumpIfNotInt
emitPatchableJumpIfNotImmediateInteger => emitPatchableJumpIfNotInt
emitJumpSlowCaseIfNotImmediateInteger => emitJumpSlowCaseIfNotInt
emitJumpSlowCaseIfNotImmediateNumber => emitJumpSlowCaseIfNotNumber
emitJumpSlowCaseIfNotImmediateIntegers => emitJumpSlowCaseIfNotInt
emitFastArithReTagImmediate => emitTagInt
emitTagAsBoolImmediate => emitTagBool
emitJumpIfImmediateNumber => emitJumpIfNumber
emitJumpIfNotImmediateNumber => emitJumpIfNotNumber
emitFastArithImmToInt - Deleted because this is an empty function.
emitFastArithIntToImmNoCheck => emitTagInt
emitPutImmediateToCallFrameHeader => emitPutToCallFrameHeader

This is purely a refactoring patch to do the renaming. There is no behavior
change.

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compileEntry):
(JSC::DFG::JITCompiler::compileSetupRegistersForEntry):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitPutToCallFrameHeader):
(JSC::AssemblyHelpers::emitPutImmediateToCallFrameHeader): Deleted.

  • jit/JIT.cpp:

(JSC::JIT::privateCompile):

  • jit/JIT.h:

(JSC::JIT::emitStoreCell):
(JSC::JIT::getSlowCase):

  • jit/JITArithmetic.cpp:

(JSC::JIT::emit_op_negate):
(JSC::JIT::emit_op_lshift):
(JSC::JIT::emit_op_rshift):
(JSC::JIT::emitSlow_op_rshift):
(JSC::JIT::emit_op_urshift):
(JSC::JIT::emitSlow_op_urshift):
(JSC::JIT::emit_op_unsigned):
(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emit_op_bitand):
(JSC::JIT::emit_op_inc):
(JSC::JIT::emit_op_dec):
(JSC::JIT::emit_op_mod):
(JSC::JIT::compileBinaryArithOp):
(JSC::JIT::compileBinaryArithOpSlowCase):
(JSC::JIT::emit_op_add):
(JSC::JIT::emitSlow_op_add):
(JSC::JIT::emit_op_mul):
(JSC::JIT::emitSlow_op_mul):
(JSC::JIT::emit_op_div):
(JSC::JIT::emitSlow_op_div):

  • jit/JITArithmetic32_64.cpp:

(JSC::JIT::emit_compareAndJump):
(JSC::JIT::emit_compareAndJumpSlow):
(JSC::JIT::emit_op_lshift):
(JSC::JIT::emitSlow_op_lshift):
(JSC::JIT::emitRightShift):
(JSC::JIT::emitRightShiftSlowCase):
(JSC::JIT::emit_op_bitand):
(JSC::JIT::emitSlow_op_bitand):
(JSC::JIT::emit_op_bitor):
(JSC::JIT::emitSlow_op_bitor):
(JSC::JIT::emit_op_bitxor):
(JSC::JIT::emitSlow_op_bitxor):
(JSC::JIT::emit_op_add):
(JSC::JIT::emitSlow_op_add):
(JSC::JIT::emit_op_sub):
(JSC::JIT::emitSlow_op_sub):

  • jit/JITInlines.h:

(JSC::JIT::emitArrayStorageGetByVal):
(JSC::JIT::isOperandConstantDouble):
(JSC::JIT::isOperandConstantChar):
(JSC::JIT::emitJumpSlowCaseIfNotJSCell):
(JSC::JIT::isOperandConstantInt):
(JSC::JIT::getOperandConstantInt):
(JSC::JIT::emitGetVirtualRegisters):
(JSC::JIT::emitLoadInt32ToDouble):
(JSC::JIT::emitJumpIfInt):
(JSC::JIT::emitJumpIfNotInt):
(JSC::JIT::emitPatchableJumpIfNotInt):
(JSC::JIT::emitJumpSlowCaseIfNotInt):
(JSC::JIT::emitJumpSlowCaseIfNotNumber):
(JSC::JIT::emitTagBool):
(JSC::JIT::isOperandConstantImmediateDouble): Deleted.
(JSC::JIT::isOperandConstantImmediateChar): Deleted.
(JSC::JIT::isOperandConstantImmediateInt): Deleted.
(JSC::JIT::getOperandConstantImmediateInt): Deleted.
(JSC::JIT::getConstantOperandImmediateInt): Deleted.
(JSC::JIT::emitJumpIfImmediateInteger): Deleted.
(JSC::JIT::emitJumpIfNotImmediateInteger): Deleted.
(JSC::JIT::emitPatchableJumpIfNotImmediateInteger): Deleted.
(JSC::JIT::emitJumpIfNotImmediateIntegers): Deleted.
(JSC::JIT::emitJumpSlowCaseIfNotImmediateInteger): Deleted.
(JSC::JIT::emitJumpSlowCaseIfNotImmediateIntegers): Deleted.
(JSC::JIT::emitJumpSlowCaseIfNotImmediateNumber): Deleted.
(JSC::JIT::emitFastArithReTagImmediate): Deleted.
(JSC::JIT::emitTagAsBoolImmediate): Deleted.

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_is_undefined):
(JSC::JIT::emit_op_is_boolean):
(JSC::JIT::emit_op_is_number):
(JSC::JIT::emit_op_is_string):
(JSC::JIT::emit_op_is_object):
(JSC::JIT::emit_op_jfalse):
(JSC::JIT::emit_op_eq):
(JSC::JIT::emit_op_jtrue):
(JSC::JIT::emit_op_neq):
(JSC::JIT::emit_op_bitxor):
(JSC::JIT::emit_op_bitor):
(JSC::JIT::compileOpStrictEq):
(JSC::JIT::emit_op_to_number):
(JSC::JIT::emit_op_eq_null):
(JSC::JIT::emit_op_neq_null):
(JSC::JIT::emitSlow_op_eq):
(JSC::JIT::emitSlow_op_neq):
(JSC::JIT::emit_op_profile_type):

  • jit/JITOpcodes32_64.cpp:

(JSC::JIT::privateCompileCTINativeCall):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_get_by_val):
(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitGenericContiguousPutByVal):
(JSC::JIT::emit_op_put_by_id):
(JSC::JIT::emitIntTypedArrayPutByVal):
(JSC::JIT::emitFloatTypedArrayPutByVal):

  • jit/JSInterfaceJIT.h:

(JSC::JSInterfaceJIT::emitJumpIfNotJSCell):
(JSC::JSInterfaceJIT::emitJumpIfNumber):
(JSC::JSInterfaceJIT::emitJumpIfNotNumber):
(JSC::JSInterfaceJIT::emitLoadDouble):
(JSC::JSInterfaceJIT::emitTagInt):
(JSC::JSInterfaceJIT::emitPutToCallFrameHeader):
(JSC::JSInterfaceJIT::emitJumpIfImmediateNumber): Deleted.
(JSC::JSInterfaceJIT::emitJumpIfNotImmediateNumber): Deleted.
(JSC::JSInterfaceJIT::emitFastArithImmToInt): Deleted.
(JSC::JSInterfaceJIT::emitFastArithIntToImmNoCheck): Deleted.
(JSC::JSInterfaceJIT::emitPutImmediateToCallFrameHeader): Deleted.

  • jit/ThunkGenerators.cpp:

(JSC::nativeForGenerator):

  • wasm/WASMFunctionCompiler.h:

(JSC::WASMFunctionCompiler::startFunction):
(JSC::WASMFunctionCompiler::endFunction):

Location:
trunk/Source/JavaScriptCore
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r190220 r190230  
     12015-09-24  Mark Lam  <mark.lam@apple.com>
     2
     3        Remove the use of "Immediate" in JIT function names.
     4        https://bugs.webkit.org/show_bug.cgi?id=149542
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        We will rename the following:
     9            isOperandConstantImmediateDouble => isOperandConstantDouble
     10            isOperandConstantImmediateInt => isOperandConstantInt
     11            isOperandConstantImmediateChar => isOperandConstantChar
     12
     13            getOperandConstantImmediateInt => getOperandConstantInt
     14            getConstantOperandImmediateInt => getOperandConstantInt
     15
     16            emitJumpIfImmediateInteger => emitJumpIfInt
     17            emitJumpIfNotImmediateInteger => emitJumpIfNotInt
     18            emitJumpIfNotImmediateIntegers => emitJumpIfNotInt
     19            emitPatchableJumpIfNotImmediateInteger => emitPatchableJumpIfNotInt
     20            emitJumpSlowCaseIfNotImmediateInteger => emitJumpSlowCaseIfNotInt
     21            emitJumpSlowCaseIfNotImmediateNumber => emitJumpSlowCaseIfNotNumber
     22            emitJumpSlowCaseIfNotImmediateIntegers => emitJumpSlowCaseIfNotInt
     23            emitFastArithReTagImmediate => emitTagInt
     24            emitTagAsBoolImmediate => emitTagBool
     25            emitJumpIfImmediateNumber => emitJumpIfNumber
     26            emitJumpIfNotImmediateNumber => emitJumpIfNotNumber
     27            emitFastArithImmToInt - Deleted because this is an empty function.
     28            emitFastArithIntToImmNoCheck => emitTagInt
     29            emitPutImmediateToCallFrameHeader => emitPutToCallFrameHeader
     30
     31        This is purely a refactoring patch to do the renaming.  There is no behavior
     32        change.
     33
     34        * dfg/DFGJITCompiler.cpp:
     35        (JSC::DFG::JITCompiler::compileEntry):
     36        (JSC::DFG::JITCompiler::compileSetupRegistersForEntry):
     37        * jit/AssemblyHelpers.h:
     38        (JSC::AssemblyHelpers::emitPutToCallFrameHeader):
     39        (JSC::AssemblyHelpers::emitPutImmediateToCallFrameHeader): Deleted.
     40        * jit/JIT.cpp:
     41        (JSC::JIT::privateCompile):
     42        * jit/JIT.h:
     43        (JSC::JIT::emitStoreCell):
     44        (JSC::JIT::getSlowCase):
     45        * jit/JITArithmetic.cpp:
     46        (JSC::JIT::emit_op_negate):
     47        (JSC::JIT::emit_op_lshift):
     48        (JSC::JIT::emit_op_rshift):
     49        (JSC::JIT::emitSlow_op_rshift):
     50        (JSC::JIT::emit_op_urshift):
     51        (JSC::JIT::emitSlow_op_urshift):
     52        (JSC::JIT::emit_op_unsigned):
     53        (JSC::JIT::emit_compareAndJump):
     54        (JSC::JIT::emit_compareAndJumpSlow):
     55        (JSC::JIT::emit_op_bitand):
     56        (JSC::JIT::emit_op_inc):
     57        (JSC::JIT::emit_op_dec):
     58        (JSC::JIT::emit_op_mod):
     59        (JSC::JIT::compileBinaryArithOp):
     60        (JSC::JIT::compileBinaryArithOpSlowCase):
     61        (JSC::JIT::emit_op_add):
     62        (JSC::JIT::emitSlow_op_add):
     63        (JSC::JIT::emit_op_mul):
     64        (JSC::JIT::emitSlow_op_mul):
     65        (JSC::JIT::emit_op_div):
     66        (JSC::JIT::emitSlow_op_div):
     67        * jit/JITArithmetic32_64.cpp:
     68        (JSC::JIT::emit_compareAndJump):
     69        (JSC::JIT::emit_compareAndJumpSlow):
     70        (JSC::JIT::emit_op_lshift):
     71        (JSC::JIT::emitSlow_op_lshift):
     72        (JSC::JIT::emitRightShift):
     73        (JSC::JIT::emitRightShiftSlowCase):
     74        (JSC::JIT::emit_op_bitand):
     75        (JSC::JIT::emitSlow_op_bitand):
     76        (JSC::JIT::emit_op_bitor):
     77        (JSC::JIT::emitSlow_op_bitor):
     78        (JSC::JIT::emit_op_bitxor):
     79        (JSC::JIT::emitSlow_op_bitxor):
     80        (JSC::JIT::emit_op_add):
     81        (JSC::JIT::emitSlow_op_add):
     82        (JSC::JIT::emit_op_sub):
     83        (JSC::JIT::emitSlow_op_sub):
     84        * jit/JITInlines.h:
     85        (JSC::JIT::emitArrayStorageGetByVal):
     86        (JSC::JIT::isOperandConstantDouble):
     87        (JSC::JIT::isOperandConstantChar):
     88        (JSC::JIT::emitJumpSlowCaseIfNotJSCell):
     89        (JSC::JIT::isOperandConstantInt):
     90        (JSC::JIT::getOperandConstantInt):
     91        (JSC::JIT::emitGetVirtualRegisters):
     92        (JSC::JIT::emitLoadInt32ToDouble):
     93        (JSC::JIT::emitJumpIfInt):
     94        (JSC::JIT::emitJumpIfNotInt):
     95        (JSC::JIT::emitPatchableJumpIfNotInt):
     96        (JSC::JIT::emitJumpSlowCaseIfNotInt):
     97        (JSC::JIT::emitJumpSlowCaseIfNotNumber):
     98        (JSC::JIT::emitTagBool):
     99        (JSC::JIT::isOperandConstantImmediateDouble): Deleted.
     100        (JSC::JIT::isOperandConstantImmediateChar): Deleted.
     101        (JSC::JIT::isOperandConstantImmediateInt): Deleted.
     102        (JSC::JIT::getOperandConstantImmediateInt): Deleted.
     103        (JSC::JIT::getConstantOperandImmediateInt): Deleted.
     104        (JSC::JIT::emitJumpIfImmediateInteger): Deleted.
     105        (JSC::JIT::emitJumpIfNotImmediateInteger): Deleted.
     106        (JSC::JIT::emitPatchableJumpIfNotImmediateInteger): Deleted.
     107        (JSC::JIT::emitJumpIfNotImmediateIntegers): Deleted.
     108        (JSC::JIT::emitJumpSlowCaseIfNotImmediateInteger): Deleted.
     109        (JSC::JIT::emitJumpSlowCaseIfNotImmediateIntegers): Deleted.
     110        (JSC::JIT::emitJumpSlowCaseIfNotImmediateNumber): Deleted.
     111        (JSC::JIT::emitFastArithReTagImmediate): Deleted.
     112        (JSC::JIT::emitTagAsBoolImmediate): Deleted.
     113        * jit/JITOpcodes.cpp:
     114        (JSC::JIT::emit_op_is_undefined):
     115        (JSC::JIT::emit_op_is_boolean):
     116        (JSC::JIT::emit_op_is_number):
     117        (JSC::JIT::emit_op_is_string):
     118        (JSC::JIT::emit_op_is_object):
     119        (JSC::JIT::emit_op_jfalse):
     120        (JSC::JIT::emit_op_eq):
     121        (JSC::JIT::emit_op_jtrue):
     122        (JSC::JIT::emit_op_neq):
     123        (JSC::JIT::emit_op_bitxor):
     124        (JSC::JIT::emit_op_bitor):
     125        (JSC::JIT::compileOpStrictEq):
     126        (JSC::JIT::emit_op_to_number):
     127        (JSC::JIT::emit_op_eq_null):
     128        (JSC::JIT::emit_op_neq_null):
     129        (JSC::JIT::emitSlow_op_eq):
     130        (JSC::JIT::emitSlow_op_neq):
     131        (JSC::JIT::emit_op_profile_type):
     132        * jit/JITOpcodes32_64.cpp:
     133        (JSC::JIT::privateCompileCTINativeCall):
     134        * jit/JITPropertyAccess.cpp:
     135        (JSC::JIT::emit_op_get_by_val):
     136        (JSC::JIT::emit_op_put_by_val):
     137        (JSC::JIT::emitGenericContiguousPutByVal):
     138        (JSC::JIT::emit_op_put_by_id):
     139        (JSC::JIT::emitIntTypedArrayPutByVal):
     140        (JSC::JIT::emitFloatTypedArrayPutByVal):
     141        * jit/JSInterfaceJIT.h:
     142        (JSC::JSInterfaceJIT::emitJumpIfNotJSCell):
     143        (JSC::JSInterfaceJIT::emitJumpIfNumber):
     144        (JSC::JSInterfaceJIT::emitJumpIfNotNumber):
     145        (JSC::JSInterfaceJIT::emitLoadDouble):
     146        (JSC::JSInterfaceJIT::emitTagInt):
     147        (JSC::JSInterfaceJIT::emitPutToCallFrameHeader):
     148        (JSC::JSInterfaceJIT::emitJumpIfImmediateNumber): Deleted.
     149        (JSC::JSInterfaceJIT::emitJumpIfNotImmediateNumber): Deleted.
     150        (JSC::JSInterfaceJIT::emitFastArithImmToInt): Deleted.
     151        (JSC::JSInterfaceJIT::emitFastArithIntToImmNoCheck): Deleted.
     152        (JSC::JSInterfaceJIT::emitPutImmediateToCallFrameHeader): Deleted.
     153        * jit/ThunkGenerators.cpp:
     154        (JSC::nativeForGenerator):
     155        * wasm/WASMFunctionCompiler.h:
     156        (JSC::WASMFunctionCompiler::startFunction):
     157        (JSC::WASMFunctionCompiler::endFunction):
     158
    11592015-09-24  Michael Saboff  <msaboff@apple.com>
    2160
  • trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp

    r190220 r190230  
    110110    // both normal return code and when jumping to an exception handler).
    111111    emitFunctionPrologue();
    112     emitPutImmediateToCallFrameHeader(m_codeBlock, JSStack::CodeBlock);
     112    emitPutToCallFrameHeader(m_codeBlock, JSStack::CodeBlock);
    113113}
    114114
  • trunk/Source/JavaScriptCore/jit/AssemblyHelpers.h

    r190076 r190230  
    480480    }
    481481
    482     void emitPutImmediateToCallFrameHeader(void* value, JSStack::CallFrameHeaderEntry entry)
     482    void emitPutToCallFrameHeader(void* value, JSStack::CallFrameHeaderEntry entry)
    483483    {
    484484        storePtr(TrustedImmPtr(value), Address(GPRInfo::callFrameRegister, entry * sizeof(Register)));
  • trunk/Source/JavaScriptCore/jit/JIT.cpp

    r189884 r190230  
    511511
    512512    emitFunctionPrologue();
    513     emitPutImmediateToCallFrameHeader(m_codeBlock, JSStack::CodeBlock);
     513    emitPutToCallFrameHeader(m_codeBlock, JSStack::CodeBlock);
    514514
    515515    Label beginLabel(this);
     
    567567        store8(TrustedImm32(0), &m_codeBlock->m_shouldAlwaysBeInlined);
    568568        emitFunctionPrologue();
    569         emitPutImmediateToCallFrameHeader(m_codeBlock, JSStack::CodeBlock);
     569        emitPutToCallFrameHeader(m_codeBlock, JSStack::CodeBlock);
    570570
    571571        load32(payloadFor(JSStack::ArgumentCount), regT1);
  • trunk/Source/JavaScriptCore/jit/JIT.h

    r190063 r190230  
    324324        enum CompileOpStrictEqType { OpStrictEq, OpNStrictEq };
    325325        void compileOpStrictEq(Instruction* instruction, CompileOpStrictEqType type);
    326         bool isOperandConstantImmediateDouble(int src);
     326        bool isOperandConstantDouble(int src);
    327327       
    328328        void emitLoadDouble(int index, FPRegisterID value);
     
    402402
    403403#if USE(JSVALUE32_64)
    404         bool getOperandConstantImmediateInt(int op1, int op2, int& op, int32_t& constant);
     404        bool getOperandConstantInt(int op1, int op2, int& op, int32_t& constant);
    405405
    406406        void emitLoadTag(int index, RegisterID tag);
     
    449449        }
    450450
    451         int32_t getConstantOperandImmediateInt(int src);
     451        int32_t getOperandConstantInt(int src);
    452452
    453453        Jump emitJumpIfJSCell(RegisterID);
     
    456456        void emitJumpSlowCaseIfNotJSCell(RegisterID);
    457457        void emitJumpSlowCaseIfNotJSCell(RegisterID, int VReg);
    458         Jump emitJumpIfImmediateInteger(RegisterID);
    459         Jump emitJumpIfNotImmediateInteger(RegisterID);
    460         Jump emitJumpIfNotImmediateIntegers(RegisterID, RegisterID, RegisterID);
    461         PatchableJump emitPatchableJumpIfNotImmediateInteger(RegisterID);
    462         void emitJumpSlowCaseIfNotImmediateInteger(RegisterID);
    463         void emitJumpSlowCaseIfNotImmediateNumber(RegisterID);
    464         void emitJumpSlowCaseIfNotImmediateIntegers(RegisterID, RegisterID, RegisterID);
    465 
    466         void emitFastArithReTagImmediate(RegisterID src, RegisterID dest);
    467 
    468         void emitTagAsBoolImmediate(RegisterID reg);
     458        Jump emitJumpIfInt(RegisterID);
     459        Jump emitJumpIfNotInt(RegisterID);
     460        Jump emitJumpIfNotInt(RegisterID, RegisterID, RegisterID scratch);
     461        PatchableJump emitPatchableJumpIfNotInt(RegisterID);
     462        void emitJumpSlowCaseIfNotInt(RegisterID);
     463        void emitJumpSlowCaseIfNotNumber(RegisterID);
     464        void emitJumpSlowCaseIfNotInt(RegisterID, RegisterID, RegisterID scratch);
     465
     466        void emitTagBool(RegisterID);
    469467        void compileBinaryArithOp(OpcodeID, int dst, int src1, int src2, OperandTypes opi);
    470468        void compileBinaryArithOpSlowCase(Instruction*, OpcodeID, Vector<SlowCaseEntry>::iterator&, int dst, int src1, int src2, OperandTypes, bool op1HasImmediateIntFastCase, bool op2HasImmediateIntFastCase);
     
    693691
    694692        JSValue getConstantOperand(int src);
    695         bool isOperandConstantImmediateInt(int src);
    696         bool isOperandConstantImmediateChar(int src);
     693        bool isOperandConstantInt(int src);
     694        bool isOperandConstantChar(int src);
    697695
    698696        Jump getSlowCase(Vector<SlowCaseEntry>::iterator& iter)
  • trunk/Source/JavaScriptCore/jit/JITArithmetic.cpp

    r190213 r190230  
    197197    emitGetVirtualRegister(src, regT0);
    198198
    199     Jump srcNotInt = emitJumpIfNotImmediateInteger(regT0);
     199    Jump srcNotInt = emitJumpIfNotInt(regT0);
    200200    addSlowCase(branchTest32(Zero, regT0, TrustedImm32(0x7fffffff)));
    201201    neg32(regT0);
    202     emitFastArithReTagImmediate(regT0, regT0);
     202    emitTagInt(regT0, regT0);
    203203
    204204    Jump end = jump();
    205205
    206206    srcNotInt.link(this);
    207     emitJumpSlowCaseIfNotImmediateNumber(regT0);
     207    emitJumpSlowCaseIfNotNumber(regT0);
    208208
    209209    move(TrustedImm64((int64_t)0x8000000000000000ull), regT1);
     
    230230
    231231    emitGetVirtualRegisters(op1, regT0, op2, regT2);
    232     // FIXME: would we be better using 'emitJumpSlowCaseIfNotImmediateIntegers'? - we *probably* ought to be consistent.
    233     emitJumpSlowCaseIfNotImmediateInteger(regT0);
    234     emitJumpSlowCaseIfNotImmediateInteger(regT2);
    235     emitFastArithImmToInt(regT0);
    236     emitFastArithImmToInt(regT2);
     232    // FIXME: would we be better using a 'emitJumpSlowCaseIfNotInt' that tests both values at once? - we *probably* ought to be consistent.
     233    emitJumpSlowCaseIfNotInt(regT0);
     234    emitJumpSlowCaseIfNotInt(regT2);
    237235    lshift32(regT2, regT0);
    238     emitFastArithReTagImmediate(regT0, regT0);
     236    emitTagInt(regT0, regT0);
    239237    emitPutVirtualRegister(result);
    240238}
     
    254252    int op2 = currentInstruction[3].u.operand;
    255253
    256     if (isOperandConstantImmediateInt(op2)) {
    257         // isOperandConstantImmediateInt(op2) => 1 SlowCase
     254    if (isOperandConstantInt(op2)) {
     255        // isOperandConstantInt(op2) => 1 SlowCase
    258256        emitGetVirtualRegister(op1, regT0);
    259         emitJumpSlowCaseIfNotImmediateInteger(regT0);
     257        emitJumpSlowCaseIfNotInt(regT0);
    260258        // Mask with 0x1f as per ecma-262 11.7.2 step 7.
    261         rshift32(Imm32(getConstantOperandImmediateInt(op2) & 0x1f), regT0);
     259        rshift32(Imm32(getOperandConstantInt(op2) & 0x1f), regT0);
    262260    } else {
    263261        emitGetVirtualRegisters(op1, regT0, op2, regT2);
    264262        if (supportsFloatingPointTruncate()) {
    265             Jump lhsIsInt = emitJumpIfImmediateInteger(regT0);
     263            Jump lhsIsInt = emitJumpIfInt(regT0);
    266264            // supportsFloatingPoint() && USE(JSVALUE64) => 3 SlowCases
    267             addSlowCase(emitJumpIfNotImmediateNumber(regT0));
     265            addSlowCase(emitJumpIfNotNumber(regT0));
    268266            add64(tagTypeNumberRegister, regT0);
    269267            move64ToDouble(regT0, fpRegT0);
    270268            addSlowCase(branchTruncateDoubleToInt32(fpRegT0, regT0));
    271269            lhsIsInt.link(this);
    272             emitJumpSlowCaseIfNotImmediateInteger(regT2);
     270            emitJumpSlowCaseIfNotInt(regT2);
    273271        } else {
    274272            // !supportsFloatingPoint() => 2 SlowCases
    275             emitJumpSlowCaseIfNotImmediateInteger(regT0);
    276             emitJumpSlowCaseIfNotImmediateInteger(regT2);
     273            emitJumpSlowCaseIfNotInt(regT0);
     274            emitJumpSlowCaseIfNotInt(regT2);
    277275        }
    278         emitFastArithImmToInt(regT2);
    279276        rshift32(regT2, regT0);
    280277    }
    281     emitFastArithIntToImmNoCheck(regT0, regT0);
     278    emitTagInt(regT0, regT0);
    282279    emitPutVirtualRegister(result);
    283280}
     
    287284    int op2 = currentInstruction[3].u.operand;
    288285
    289     if (isOperandConstantImmediateInt(op2))
     286    if (isOperandConstantInt(op2))
    290287        linkSlowCase(iter);
    291288
     
    311308    int op2 = currentInstruction[3].u.operand;
    312309
    313     if (isOperandConstantImmediateInt(op2)) {
    314         // isOperandConstantImmediateInt(op2) => 1 SlowCase
     310    if (isOperandConstantInt(op2)) {
     311        // isOperandConstantInt(op2) => 1 SlowCase
    315312        emitGetVirtualRegister(op1, regT0);
    316         emitJumpSlowCaseIfNotImmediateInteger(regT0);
     313        emitJumpSlowCaseIfNotInt(regT0);
    317314        // Mask with 0x1f as per ecma-262 11.7.2 step 7.
    318         urshift32(Imm32(getConstantOperandImmediateInt(op2) & 0x1f), regT0);
     315        urshift32(Imm32(getOperandConstantInt(op2) & 0x1f), regT0);
    319316    } else {
    320317        emitGetVirtualRegisters(op1, regT0, op2, regT2);
    321318        if (supportsFloatingPointTruncate()) {
    322             Jump lhsIsInt = emitJumpIfImmediateInteger(regT0);
     319            Jump lhsIsInt = emitJumpIfInt(regT0);
    323320            // supportsFloatingPoint() && USE(JSVALUE64) => 3 SlowCases
    324             addSlowCase(emitJumpIfNotImmediateNumber(regT0));
     321            addSlowCase(emitJumpIfNotNumber(regT0));
    325322            add64(tagTypeNumberRegister, regT0);
    326323            move64ToDouble(regT0, fpRegT0);
    327324            addSlowCase(branchTruncateDoubleToInt32(fpRegT0, regT0));
    328325            lhsIsInt.link(this);
    329             emitJumpSlowCaseIfNotImmediateInteger(regT2);
     326            emitJumpSlowCaseIfNotInt(regT2);
    330327        } else {
    331328            // !supportsFloatingPoint() => 2 SlowCases
    332             emitJumpSlowCaseIfNotImmediateInteger(regT0);
    333             emitJumpSlowCaseIfNotImmediateInteger(regT2);
     329            emitJumpSlowCaseIfNotInt(regT0);
     330            emitJumpSlowCaseIfNotInt(regT2);
    334331        }
    335         emitFastArithImmToInt(regT2);
    336332        urshift32(regT2, regT0);
    337333    }
    338     emitFastArithIntToImmNoCheck(regT0, regT0);
     334    emitTagInt(regT0, regT0);
    339335    emitPutVirtualRegister(result);
    340336}
     
    344340    int op2 = currentInstruction[3].u.operand;
    345341
    346     if (isOperandConstantImmediateInt(op2))
     342    if (isOperandConstantInt(op2))
    347343        linkSlowCase(iter);
    348344
     
    368364   
    369365    emitGetVirtualRegister(op1, regT0);
    370     emitJumpSlowCaseIfNotImmediateInteger(regT0);
     366    emitJumpSlowCaseIfNotInt(regT0);
    371367    addSlowCase(branch32(LessThan, regT0, TrustedImm32(0)));
    372     emitFastArithReTagImmediate(regT0, regT0);
     368    emitTagInt(regT0, regT0);
    373369    emitPutVirtualRegister(result, regT0);
    374370}
     
    390386    // - int immediate to int immediate
    391387
    392     if (isOperandConstantImmediateChar(op1)) {
     388    if (isOperandConstantChar(op1)) {
    393389        emitGetVirtualRegister(op2, regT0);
    394390        addSlowCase(emitJumpIfNotJSCell(regT0));
     
    399395        return;
    400396    }
    401     if (isOperandConstantImmediateChar(op2)) {
     397    if (isOperandConstantChar(op2)) {
    402398        emitGetVirtualRegister(op1, regT0);
    403399        addSlowCase(emitJumpIfNotJSCell(regT0));
     
    408404        return;
    409405    }
    410     if (isOperandConstantImmediateInt(op2)) {
     406    if (isOperandConstantInt(op2)) {
    411407        emitGetVirtualRegister(op1, regT0);
    412         emitJumpSlowCaseIfNotImmediateInteger(regT0);
    413         int32_t op2imm = getConstantOperandImmediateInt(op2);
     408        emitJumpSlowCaseIfNotInt(regT0);
     409        int32_t op2imm = getOperandConstantInt(op2);
    414410        addJump(branch32(condition, regT0, Imm32(op2imm)), target);
    415     } else if (isOperandConstantImmediateInt(op1)) {
     411    } else if (isOperandConstantInt(op1)) {
    416412        emitGetVirtualRegister(op2, regT1);
    417         emitJumpSlowCaseIfNotImmediateInteger(regT1);
    418         int32_t op1imm = getConstantOperandImmediateInt(op1);
     413        emitJumpSlowCaseIfNotInt(regT1);
     414        int32_t op1imm = getOperandConstantInt(op1);
    419415        addJump(branch32(commute(condition), regT1, Imm32(op1imm)), target);
    420416    } else {
    421417        emitGetVirtualRegisters(op1, regT0, op2, regT1);
    422         emitJumpSlowCaseIfNotImmediateInteger(regT0);
    423         emitJumpSlowCaseIfNotImmediateInteger(regT1);
     418        emitJumpSlowCaseIfNotInt(regT0);
     419        emitJumpSlowCaseIfNotInt(regT1);
    424420
    425421        addJump(branch32(condition, regT0, regT1), target);
     
    441437    // - constant int immediate to floating-point number
    442438    // - floating-point number to floating-point number.
    443     if (isOperandConstantImmediateChar(op1) || isOperandConstantImmediateChar(op2)) {
     439    if (isOperandConstantChar(op1) || isOperandConstantChar(op2)) {
    444440        linkSlowCase(iter);
    445441        linkSlowCase(iter);
     
    454450    }
    455451
    456     if (isOperandConstantImmediateInt(op2)) {
     452    if (isOperandConstantInt(op2)) {
    457453        linkSlowCase(iter);
    458454
    459455        if (supportsFloatingPoint()) {
    460             Jump fail1 = emitJumpIfNotImmediateNumber(regT0);
     456            Jump fail1 = emitJumpIfNotNumber(regT0);
    461457            add64(tagTypeNumberRegister, regT0);
    462458            move64ToDouble(regT0, fpRegT0);
     
    477473        callOperation(operation, regT0, regT1);
    478474        emitJumpSlowToHot(branchTest32(invert ? Zero : NonZero, returnValueGPR), target);
    479     } else if (isOperandConstantImmediateInt(op1)) {
     475    } else if (isOperandConstantInt(op1)) {
    480476        linkSlowCase(iter);
    481477
    482478        if (supportsFloatingPoint()) {
    483             Jump fail1 = emitJumpIfNotImmediateNumber(regT1);
     479            Jump fail1 = emitJumpIfNotNumber(regT1);
    484480            add64(tagTypeNumberRegister, regT1);
    485481            move64ToDouble(regT1, fpRegT1);
     
    504500
    505501        if (supportsFloatingPoint()) {
    506             Jump fail1 = emitJumpIfNotImmediateNumber(regT0);
    507             Jump fail2 = emitJumpIfNotImmediateNumber(regT1);
    508             Jump fail3 = emitJumpIfImmediateInteger(regT1);
     502            Jump fail1 = emitJumpIfNotNumber(regT0);
     503            Jump fail2 = emitJumpIfNotNumber(regT1);
     504            Jump fail3 = emitJumpIfInt(regT1);
    509505            add64(tagTypeNumberRegister, regT0);
    510506            add64(tagTypeNumberRegister, regT1);
     
    533529    int op2 = currentInstruction[3].u.operand;
    534530
    535     if (isOperandConstantImmediateInt(op1)) {
     531    if (isOperandConstantInt(op1)) {
    536532        emitGetVirtualRegister(op2, regT0);
    537         emitJumpSlowCaseIfNotImmediateInteger(regT0);
    538         int32_t imm = getConstantOperandImmediateInt(op1);
     533        emitJumpSlowCaseIfNotInt(regT0);
     534        int32_t imm = getOperandConstantInt(op1);
    539535        and64(Imm32(imm), regT0);
    540536        if (imm >= 0)
    541             emitFastArithIntToImmNoCheck(regT0, regT0);
    542     } else if (isOperandConstantImmediateInt(op2)) {
     537            emitTagInt(regT0, regT0);
     538    } else if (isOperandConstantInt(op2)) {
    543539        emitGetVirtualRegister(op1, regT0);
    544         emitJumpSlowCaseIfNotImmediateInteger(regT0);
    545         int32_t imm = getConstantOperandImmediateInt(op2);
     540        emitJumpSlowCaseIfNotInt(regT0);
     541        int32_t imm = getOperandConstantInt(op2);
    546542        and64(Imm32(imm), regT0);
    547543        if (imm >= 0)
    548             emitFastArithIntToImmNoCheck(regT0, regT0);
     544            emitTagInt(regT0, regT0);
    549545    } else {
    550546        emitGetVirtualRegisters(op1, regT0, op2, regT1);
    551547        and64(regT1, regT0);
    552         emitJumpSlowCaseIfNotImmediateInteger(regT0);
     548        emitJumpSlowCaseIfNotInt(regT0);
    553549    }
    554550    emitPutVirtualRegister(result);
     
    568564
    569565    emitGetVirtualRegister(srcDst, regT0);
    570     emitJumpSlowCaseIfNotImmediateInteger(regT0);
     566    emitJumpSlowCaseIfNotInt(regT0);
    571567    addSlowCase(branchAdd32(Overflow, TrustedImm32(1), regT0));
    572     emitFastArithIntToImmNoCheck(regT0, regT0);
     568    emitTagInt(regT0, regT0);
    573569    emitPutVirtualRegister(srcDst);
    574570}
     
    587583
    588584    emitGetVirtualRegister(srcDst, regT0);
    589     emitJumpSlowCaseIfNotImmediateInteger(regT0);
     585    emitJumpSlowCaseIfNotInt(regT0);
    590586    addSlowCase(branchSub32(Overflow, TrustedImm32(1), regT0));
    591     emitFastArithIntToImmNoCheck(regT0, regT0);
     587    emitTagInt(regT0, regT0);
    592588    emitPutVirtualRegister(srcDst);
    593589}
     
    619615
    620616    emitGetVirtualRegisters(op1, regT4, op2, ecx);
    621     emitJumpSlowCaseIfNotImmediateInteger(regT4);
    622     emitJumpSlowCaseIfNotImmediateInteger(ecx);
     617    emitJumpSlowCaseIfNotInt(regT4);
     618    emitJumpSlowCaseIfNotInt(ecx);
    623619
    624620    move(regT4, regT0);
     
    632628    addSlowCase(branchTest32(Zero, edx));
    633629    numeratorPositive.link(this);
    634     emitFastArithReTagImmediate(edx, regT0);
     630    emitTagInt(edx, regT0);
    635631    emitPutVirtualRegister(result);
    636632}
     
    669665{
    670666    emitGetVirtualRegisters(op1, regT0, op2, regT1);
    671     emitJumpSlowCaseIfNotImmediateInteger(regT0);
    672     emitJumpSlowCaseIfNotImmediateInteger(regT1);
     667    emitJumpSlowCaseIfNotInt(regT0);
     668    emitJumpSlowCaseIfNotInt(regT1);
    673669    RareCaseProfile* profile = m_codeBlock->addSpecialFastCaseProfile(m_bytecodeOffset);
    674670    if (opcodeID == op_add)
     
    702698        }
    703699    }
    704     emitFastArithIntToImmNoCheck(regT0, regT0);
     700    emitTagInt(regT0, regT0);
    705701}
    706702
     
    734730        notImm2.link(this);
    735731        if (!types.second().definitelyIsNumber())
    736             emitJumpIfNotImmediateNumber(regT0).linkTo(stubFunctionCall, this);
     732            emitJumpIfNotNumber(regT0).linkTo(stubFunctionCall, this);
    737733        emitGetVirtualRegister(op1, regT1);
    738734        convertInt32ToDouble(regT1, fpRegT1);
     
    742738        notImm1.link(this);
    743739        if (!types.first().definitelyIsNumber())
    744             emitJumpIfNotImmediateNumber(regT0).linkTo(stubFunctionCall, this);
     740            emitJumpIfNotNumber(regT0).linkTo(stubFunctionCall, this);
    745741        emitGetVirtualRegister(op2, regT1);
    746742        convertInt32ToDouble(regT1, fpRegT1);
     
    751747        notImm1.link(this);
    752748        if (!types.first().definitelyIsNumber())
    753             emitJumpIfNotImmediateNumber(regT0).linkTo(stubFunctionCall, this);
     749            emitJumpIfNotNumber(regT0).linkTo(stubFunctionCall, this);
    754750        if (!types.second().definitelyIsNumber())
    755             emitJumpIfNotImmediateNumber(regT1).linkTo(stubFunctionCall, this);
     751            emitJumpIfNotNumber(regT1).linkTo(stubFunctionCall, this);
    756752        add64(tagTypeNumberRegister, regT0);
    757753        move64ToDouble(regT0, fpRegT1);
    758         Jump op2isDouble = emitJumpIfNotImmediateInteger(regT1);
     754        Jump op2isDouble = emitJumpIfNotInt(regT1);
    759755        convertInt32ToDouble(regT1, fpRegT2);
    760756        Jump op2wasInteger = jump();
     
    763759        notImm2.link(this);
    764760        if (!types.second().definitelyIsNumber())
    765             emitJumpIfNotImmediateNumber(regT1).linkTo(stubFunctionCall, this);
     761            emitJumpIfNotNumber(regT1).linkTo(stubFunctionCall, this);
    766762        convertInt32ToDouble(regT0, fpRegT1);
    767763        op2isDouble.link(this);
     
    801797    }
    802798
    803     if (isOperandConstantImmediateInt(op1)) {
     799    if (isOperandConstantInt(op1)) {
    804800        emitGetVirtualRegister(op2, regT0);
    805         emitJumpSlowCaseIfNotImmediateInteger(regT0);
    806         addSlowCase(branchAdd32(Overflow, regT0, Imm32(getConstantOperandImmediateInt(op1)), regT1));
    807         emitFastArithIntToImmNoCheck(regT1, regT0);
    808     } else if (isOperandConstantImmediateInt(op2)) {
     801        emitJumpSlowCaseIfNotInt(regT0);
     802        addSlowCase(branchAdd32(Overflow, regT0, Imm32(getOperandConstantInt(op1)), regT1));
     803        emitTagInt(regT1, regT0);
     804    } else if (isOperandConstantInt(op2)) {
    809805        emitGetVirtualRegister(op1, regT0);
    810         emitJumpSlowCaseIfNotImmediateInteger(regT0);
    811         addSlowCase(branchAdd32(Overflow, regT0, Imm32(getConstantOperandImmediateInt(op2)), regT1));
    812         emitFastArithIntToImmNoCheck(regT1, regT0);
     806        emitJumpSlowCaseIfNotInt(regT0);
     807        addSlowCase(branchAdd32(Overflow, regT0, Imm32(getOperandConstantInt(op2)), regT1));
     808        emitTagInt(regT1, regT0);
    813809    } else
    814810        compileBinaryArithOp(op_add, result, op1, op2, types);
     
    826822    RELEASE_ASSERT(types.first().mightBeNumber() && types.second().mightBeNumber());
    827823
    828     bool op1HasImmediateIntFastCase = isOperandConstantImmediateInt(op1);
    829     bool op2HasImmediateIntFastCase = !op1HasImmediateIntFastCase && isOperandConstantImmediateInt(op2);
     824    bool op1HasImmediateIntFastCase = isOperandConstantInt(op1);
     825    bool op2HasImmediateIntFastCase = !op1HasImmediateIntFastCase && isOperandConstantInt(op2);
    830826    compileBinaryArithOpSlowCase(currentInstruction, op_add, iter, result, op1, op2, types, op1HasImmediateIntFastCase, op2HasImmediateIntFastCase);
    831827}
     
    840836    // For now, only plant a fast int case if the constant operand is greater than zero.
    841837    int32_t value;
    842     if (isOperandConstantImmediateInt(op1) && ((value = getConstantOperandImmediateInt(op1)) > 0)) {
     838    if (isOperandConstantInt(op1) && ((value = getOperandConstantInt(op1)) > 0)) {
    843839        // Add a special fast case profile because the DFG JIT will expect one.
    844840        m_codeBlock->addSpecialFastCaseProfile(m_bytecodeOffset);
    845841        emitGetVirtualRegister(op2, regT0);
    846         emitJumpSlowCaseIfNotImmediateInteger(regT0);
     842        emitJumpSlowCaseIfNotInt(regT0);
    847843        addSlowCase(branchMul32(Overflow, Imm32(value), regT0, regT1));
    848         emitFastArithReTagImmediate(regT1, regT0);
    849     } else if (isOperandConstantImmediateInt(op2) && ((value = getConstantOperandImmediateInt(op2)) > 0)) {
     844        emitTagInt(regT1, regT0);
     845    } else if (isOperandConstantInt(op2) && ((value = getOperandConstantInt(op2)) > 0)) {
    850846        // Add a special fast case profile because the DFG JIT will expect one.
    851847        m_codeBlock->addSpecialFastCaseProfile(m_bytecodeOffset);
    852848        emitGetVirtualRegister(op1, regT0);
    853         emitJumpSlowCaseIfNotImmediateInteger(regT0);
     849        emitJumpSlowCaseIfNotInt(regT0);
    854850        addSlowCase(branchMul32(Overflow, Imm32(value), regT0, regT1));
    855         emitFastArithReTagImmediate(regT1, regT0);
     851        emitTagInt(regT1, regT0);
    856852    } else
    857853        compileBinaryArithOp(op_mul, result, op1, op2, types);
     
    867863    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
    868864
    869     bool op1HasImmediateIntFastCase = isOperandConstantImmediateInt(op1) && getConstantOperandImmediateInt(op1) > 0;
    870     bool op2HasImmediateIntFastCase = !op1HasImmediateIntFastCase && isOperandConstantImmediateInt(op2) && getConstantOperandImmediateInt(op2) > 0;
     865    bool op1HasImmediateIntFastCase = isOperandConstantInt(op1) && getOperandConstantInt(op1) > 0;
     866    bool op2HasImmediateIntFastCase = !op1HasImmediateIntFastCase && isOperandConstantInt(op2) && getOperandConstantInt(op2) > 0;
    871867    compileBinaryArithOpSlowCase(currentInstruction, op_mul, iter, result, op1, op2, types, op1HasImmediateIntFastCase, op2HasImmediateIntFastCase);
    872868}
     
    879875    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
    880876
    881     if (isOperandConstantImmediateDouble(op1)) {
     877    if (isOperandConstantDouble(op1)) {
    882878        emitGetVirtualRegister(op1, regT0);
    883879        add64(tagTypeNumberRegister, regT0);
    884880        move64ToDouble(regT0, fpRegT0);
    885     } else if (isOperandConstantImmediateInt(op1)) {
     881    } else if (isOperandConstantInt(op1)) {
    886882        emitLoadInt32ToDouble(op1, fpRegT0);
    887883    } else {
    888884        emitGetVirtualRegister(op1, regT0);
    889885        if (!types.first().definitelyIsNumber())
    890             emitJumpSlowCaseIfNotImmediateNumber(regT0);
    891         Jump notInt = emitJumpIfNotImmediateInteger(regT0);
     886            emitJumpSlowCaseIfNotNumber(regT0);
     887        Jump notInt = emitJumpIfNotInt(regT0);
    892888        convertInt32ToDouble(regT0, fpRegT0);
    893889        Jump skipDoubleLoad = jump();
     
    898894    }
    899895
    900     if (isOperandConstantImmediateDouble(op2)) {
     896    if (isOperandConstantDouble(op2)) {
    901897        emitGetVirtualRegister(op2, regT1);
    902898        add64(tagTypeNumberRegister, regT1);
    903899        move64ToDouble(regT1, fpRegT1);
    904     } else if (isOperandConstantImmediateInt(op2)) {
     900    } else if (isOperandConstantInt(op2)) {
    905901        emitLoadInt32ToDouble(op2, fpRegT1);
    906902    } else {
    907903        emitGetVirtualRegister(op2, regT1);
    908904        if (!types.second().definitelyIsNumber())
    909             emitJumpSlowCaseIfNotImmediateNumber(regT1);
    910         Jump notInt = emitJumpIfNotImmediateInteger(regT1);
     905            emitJumpSlowCaseIfNotNumber(regT1);
     906        Jump notInt = emitJumpIfNotInt(regT1);
    911907        convertInt32ToDouble(regT1, fpRegT1);
    912908        Jump skipDoubleLoad = jump();
     
    932928    branchConvertDoubleToInt32(fpRegT0, regT0, notInteger, fpRegT1);
    933929    // If we've got an integer, we might as well make that the result of the division.
    934     emitFastArithReTagImmediate(regT0, regT0);
     930    emitTagInt(regT0, regT0);
    935931    Jump isInteger = jump();
    936932    notInteger.link(this);
     
    958954        return;
    959955    }
    960     if (!isOperandConstantImmediateDouble(op1) && !isOperandConstantImmediateInt(op1)) {
     956    if (!isOperandConstantDouble(op1) && !isOperandConstantInt(op1)) {
    961957        if (!types.first().definitelyIsNumber())
    962958            linkSlowCase(iter);
    963959    }
    964     if (!isOperandConstantImmediateDouble(op2) && !isOperandConstantImmediateInt(op2)) {
     960    if (!isOperandConstantDouble(op2) && !isOperandConstantInt(op2)) {
    965961        if (!types.second().definitelyIsNumber())
    966962            linkSlowCase(iter);
  • trunk/Source/JavaScriptCore/jit/JITArithmetic32_64.cpp

    r190213 r190230  
    8484
    8585    // Character less.
    86     if (isOperandConstantImmediateChar(op1)) {
     86    if (isOperandConstantChar(op1)) {
    8787        emitLoad(op2, regT1, regT0);
    8888        addSlowCase(branch32(NotEqual, regT1, TrustedImm32(JSValue::CellTag)));
     
    9393        return;
    9494    }
    95     if (isOperandConstantImmediateChar(op2)) {
     95    if (isOperandConstantChar(op2)) {
    9696        emitLoad(op1, regT1, regT0);
    9797        addSlowCase(branch32(NotEqual, regT1, TrustedImm32(JSValue::CellTag)));
     
    102102        return;
    103103    }
    104     if (isOperandConstantImmediateInt(op1)) {
     104    if (isOperandConstantInt(op1)) {
    105105        emitLoad(op2, regT3, regT2);
    106106        notInt32Op2.append(branch32(NotEqual, regT3, TrustedImm32(JSValue::Int32Tag)));
    107107        addJump(branch32(commute(condition), regT2, Imm32(getConstantOperand(op1).asInt32())), target);
    108     } else if (isOperandConstantImmediateInt(op2)) {
     108    } else if (isOperandConstantInt(op2)) {
    109109        emitLoad(op1, regT1, regT0);
    110110        notInt32Op1.append(branch32(NotEqual, regT1, TrustedImm32(JSValue::Int32Tag)));
     
    125125
    126126    // Double less.
    127     emitBinaryDoubleOp(opcode, target, op1, op2, OperandTypes(), notInt32Op1, notInt32Op2, !isOperandConstantImmediateInt(op1), isOperandConstantImmediateInt(op1) || !isOperandConstantImmediateInt(op2));
     127    emitBinaryDoubleOp(opcode, target, op1, op2, OperandTypes(), notInt32Op1, notInt32Op2, !isOperandConstantInt(op1), isOperandConstantInt(op1) || !isOperandConstantInt(op2));
    128128    end.link(this);
    129129}
     
    131131void JIT::emit_compareAndJumpSlow(int op1, int op2, unsigned target, DoubleCondition, size_t (JIT_OPERATION *operation)(ExecState*, EncodedJSValue, EncodedJSValue), bool invert, Vector<SlowCaseEntry>::iterator& iter)
    132132{
    133     if (isOperandConstantImmediateChar(op1) || isOperandConstantImmediateChar(op2)) {
     133    if (isOperandConstantChar(op1) || isOperandConstantChar(op2)) {
    134134        linkSlowCase(iter);
    135135        linkSlowCase(iter);
     
    138138    } else {
    139139        if (!supportsFloatingPoint()) {
    140             if (!isOperandConstantImmediateInt(op1) && !isOperandConstantImmediateInt(op2))
     140            if (!isOperandConstantInt(op1) && !isOperandConstantInt(op2))
    141141                linkSlowCase(iter); // int32 check
    142142            linkSlowCase(iter); // int32 check
    143143        } else {
    144             if (!isOperandConstantImmediateInt(op1)) {
     144            if (!isOperandConstantInt(op1)) {
    145145                linkSlowCase(iter); // double check
    146146                linkSlowCase(iter); // int32 check
    147147            }
    148             if (isOperandConstantImmediateInt(op1) || !isOperandConstantImmediateInt(op2))
     148            if (isOperandConstantInt(op1) || !isOperandConstantInt(op2))
    149149                linkSlowCase(iter); // double check
    150150        }
     
    164164    int op2 = currentInstruction[3].u.operand;
    165165
    166     if (isOperandConstantImmediateInt(op2)) {
     166    if (isOperandConstantInt(op2)) {
    167167        emitLoad(op1, regT1, regT0);
    168168        addSlowCase(branch32(NotEqual, regT1, TrustedImm32(JSValue::Int32Tag)));
     
    173173
    174174    emitLoad2(op1, regT1, regT0, op2, regT3, regT2);
    175     if (!isOperandConstantImmediateInt(op1))
     175    if (!isOperandConstantInt(op1))
    176176        addSlowCase(branch32(NotEqual, regT1, TrustedImm32(JSValue::Int32Tag)));
    177177    addSlowCase(branch32(NotEqual, regT3, TrustedImm32(JSValue::Int32Tag)));
     
    185185    int op2 = currentInstruction[3].u.operand;
    186186
    187     if (!isOperandConstantImmediateInt(op1) && !isOperandConstantImmediateInt(op2))
     187    if (!isOperandConstantInt(op1) && !isOperandConstantInt(op2))
    188188        linkSlowCase(iter); // int32 check
    189189    linkSlowCase(iter); // int32 check
     
    203203    // Slow case of rshift makes assumptions about what registers hold the
    204204    // shift arguments, so any changes must be updated there as well.
    205     if (isOperandConstantImmediateInt(op2)) {
     205    if (isOperandConstantInt(op2)) {
    206206        emitLoad(op1, regT1, regT0);
    207207        addSlowCase(branch32(NotEqual, regT1, TrustedImm32(JSValue::Int32Tag)));
     
    216216    } else {
    217217        emitLoad2(op1, regT1, regT0, op2, regT3, regT2);
    218         if (!isOperandConstantImmediateInt(op1))
     218        if (!isOperandConstantInt(op1))
    219219            addSlowCase(branch32(NotEqual, regT1, TrustedImm32(JSValue::Int32Tag)));
    220220        addSlowCase(branch32(NotEqual, regT3, TrustedImm32(JSValue::Int32Tag)));
     
    232232    int op1 = currentInstruction[2].u.operand;
    233233    int op2 = currentInstruction[3].u.operand;
    234     if (isOperandConstantImmediateInt(op2)) {
     234    if (isOperandConstantInt(op2)) {
    235235        int shift = getConstantOperand(op2).asInt32() & 0x1f;
    236236        // op1 = regT1:regT0
     
    255255        // op1 = regT1:regT0
    256256        // op2 = regT3:regT2
    257         if (!isOperandConstantImmediateInt(op1)) {
     257        if (!isOperandConstantInt(op1)) {
    258258            linkSlowCase(iter); // int32 check -- op1 is not an int
    259259            if (supportsFloatingPointTruncate()) {
     
    336336    int op;
    337337    int32_t constant;
    338     if (getOperandConstantImmediateInt(op1, op2, op, constant)) {
     338    if (getOperandConstantInt(op1, op2, op, constant)) {
    339339        emitLoad(op, regT1, regT0);
    340340        addSlowCase(branch32(NotEqual, regT1, TrustedImm32(JSValue::Int32Tag)));
     
    356356    int op2 = currentInstruction[3].u.operand;
    357357
    358     if (!isOperandConstantImmediateInt(op1) && !isOperandConstantImmediateInt(op2))
     358    if (!isOperandConstantInt(op1) && !isOperandConstantInt(op2))
    359359        linkSlowCase(iter); // int32 check
    360360    linkSlowCase(iter); // int32 check
     
    374374    int op;
    375375    int32_t constant;
    376     if (getOperandConstantImmediateInt(op1, op2, op, constant)) {
     376    if (getOperandConstantInt(op1, op2, op, constant)) {
    377377        emitLoad(op, regT1, regT0);
    378378        addSlowCase(branch32(NotEqual, regT1, TrustedImm32(JSValue::Int32Tag)));
     
    394394    int op2 = currentInstruction[3].u.operand;
    395395
    396     if (!isOperandConstantImmediateInt(op1) && !isOperandConstantImmediateInt(op2))
     396    if (!isOperandConstantInt(op1) && !isOperandConstantInt(op2))
    397397        linkSlowCase(iter); // int32 check
    398398    linkSlowCase(iter); // int32 check
     
    412412    int op;
    413413    int32_t constant;
    414     if (getOperandConstantImmediateInt(op1, op2, op, constant)) {
     414    if (getOperandConstantInt(op1, op2, op, constant)) {
    415415        emitLoad(op, regT1, regT0);
    416416        addSlowCase(branch32(NotEqual, regT1, TrustedImm32(JSValue::Int32Tag)));
     
    432432    int op2 = currentInstruction[3].u.operand;
    433433
    434     if (!isOperandConstantImmediateInt(op1) && !isOperandConstantImmediateInt(op2))
     434    if (!isOperandConstantInt(op1) && !isOperandConstantInt(op2))
    435435        linkSlowCase(iter); // int32 check
    436436    linkSlowCase(iter); // int32 check
     
    500500    int op;
    501501    int32_t constant;
    502     if (getOperandConstantImmediateInt(op1, op2, op, constant)) {
     502    if (getOperandConstantInt(op1, op2, op, constant)) {
    503503        emitAdd32Constant(dst, op, constant, op == op1 ? types.first() : types.second());
    504504        return;
     
    562562    int op;
    563563    int32_t constant;
    564     if (getOperandConstantImmediateInt(op1, op2, op, constant)) {
     564    if (getOperandConstantInt(op1, op2, op, constant)) {
    565565        linkSlowCase(iter); // overflow check
    566566
     
    605605    JumpList notInt32Op2;
    606606
    607     if (isOperandConstantImmediateInt(op2)) {
     607    if (isOperandConstantInt(op2)) {
    608608        emitSub32Constant(dst, op1, getConstantOperand(op2).asInt32(), types.first());
    609609        return;
     
    662662    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
    663663
    664     if (isOperandConstantImmediateInt(op2)) {
     664    if (isOperandConstantInt(op2)) {
    665665        linkSlowCase(iter); // overflow check
    666666
  • trunk/Source/JavaScriptCore/jit/JITInlines.h

    r190063 r190230  
    7878}
    7979
    80 ALWAYS_INLINE bool JIT::isOperandConstantImmediateDouble(int src)
     80ALWAYS_INLINE bool JIT::isOperandConstantDouble(int src)
    8181{
    8282    return m_codeBlock->isConstantRegisterIndex(src) && getConstantOperand(src).isDouble();
     
    872872#endif
    873873
    874 ALWAYS_INLINE bool JIT::isOperandConstantImmediateChar(int src)
     874ALWAYS_INLINE bool JIT::isOperandConstantChar(int src)
    875875{
    876876    return m_codeBlock->isConstantRegisterIndex(src) && getConstantOperand(src).isString() && asString(getConstantOperand(src).asCell())->length() == 1;
     
    11151115}
    11161116
    1117 ALWAYS_INLINE bool JIT::isOperandConstantImmediateInt(int src)
     1117ALWAYS_INLINE bool JIT::isOperandConstantInt(int src)
    11181118{
    11191119    return m_codeBlock->isConstantRegisterIndex(src) && getConstantOperand(src).isInt32();
    11201120}
    11211121
    1122 ALWAYS_INLINE bool JIT::getOperandConstantImmediateInt(int op1, int op2, int& op, int32_t& constant)
    1123 {
    1124     if (isOperandConstantImmediateInt(op1)) {
     1122ALWAYS_INLINE bool JIT::getOperandConstantInt(int op1, int op2, int& op, int32_t& constant)
     1123{
     1124    if (isOperandConstantInt(op1)) {
    11251125        constant = getConstantOperand(op1).asInt32();
    11261126        op = op2;
     
    11281128    }
    11291129
    1130     if (isOperandConstantImmediateInt(op2)) {
     1130    if (isOperandConstantInt(op2)) {
    11311131        constant = getConstantOperand(op2).asInt32();
    11321132        op = op1;
     
    11731173}
    11741174
    1175 ALWAYS_INLINE int32_t JIT::getConstantOperandImmediateInt(int src)
     1175ALWAYS_INLINE int32_t JIT::getOperandConstantInt(int src)
    11761176{
    11771177    return getConstantOperand(src).asInt32();
    11781178}
    11791179
    1180 ALWAYS_INLINE bool JIT::isOperandConstantImmediateInt(int src)
     1180ALWAYS_INLINE bool JIT::isOperandConstantInt(int src)
    11811181{
    11821182    return m_codeBlock->isConstantRegisterIndex(src) && getConstantOperand(src).isInt32();
     
    12381238{
    12391239    if (m_codeBlock->isConstantRegisterIndex(index)) {
    1240         ASSERT(isOperandConstantImmediateInt(index));
     1240        ASSERT(isOperandConstantInt(index));
    12411241        convertInt32ToDouble(Imm32(getConstantOperand(index).asInt32()), value);
    12421242    } else
     
    12441244}
    12451245
    1246 ALWAYS_INLINE JIT::Jump JIT::emitJumpIfImmediateInteger(RegisterID reg)
     1246ALWAYS_INLINE JIT::Jump JIT::emitJumpIfInt(RegisterID reg)
    12471247{
    12481248    return branch64(AboveOrEqual, reg, tagTypeNumberRegister);
    12491249}
    12501250
    1251 ALWAYS_INLINE JIT::Jump JIT::emitJumpIfNotImmediateInteger(RegisterID reg)
     1251ALWAYS_INLINE JIT::Jump JIT::emitJumpIfNotInt(RegisterID reg)
    12521252{
    12531253    return branch64(Below, reg, tagTypeNumberRegister);
    12541254}
    12551255
    1256 ALWAYS_INLINE JIT::PatchableJump JIT::emitPatchableJumpIfNotImmediateInteger(RegisterID reg)
     1256ALWAYS_INLINE JIT::PatchableJump JIT::emitPatchableJumpIfNotInt(RegisterID reg)
    12571257{
    12581258    return patchableBranch64(Below, reg, tagTypeNumberRegister);
    12591259}
    12601260
    1261 ALWAYS_INLINE JIT::Jump JIT::emitJumpIfNotImmediateIntegers(RegisterID reg1, RegisterID reg2, RegisterID scratch)
     1261ALWAYS_INLINE JIT::Jump JIT::emitJumpIfNotInt(RegisterID reg1, RegisterID reg2, RegisterID scratch)
    12621262{
    12631263    move(reg1, scratch);
    12641264    and64(reg2, scratch);
    1265     return emitJumpIfNotImmediateInteger(scratch);
    1266 }
    1267 
    1268 ALWAYS_INLINE void JIT::emitJumpSlowCaseIfNotImmediateInteger(RegisterID reg)
    1269 {
    1270     addSlowCase(emitJumpIfNotImmediateInteger(reg));
    1271 }
    1272 
    1273 ALWAYS_INLINE void JIT::emitJumpSlowCaseIfNotImmediateIntegers(RegisterID reg1, RegisterID reg2, RegisterID scratch)
    1274 {
    1275     addSlowCase(emitJumpIfNotImmediateIntegers(reg1, reg2, scratch));
    1276 }
    1277 
    1278 ALWAYS_INLINE void JIT::emitJumpSlowCaseIfNotImmediateNumber(RegisterID reg)
    1279 {
    1280     addSlowCase(emitJumpIfNotImmediateNumber(reg));
    1281 }
    1282 
    1283 ALWAYS_INLINE void JIT::emitFastArithReTagImmediate(RegisterID src, RegisterID dest)
    1284 {
    1285     emitFastArithIntToImmNoCheck(src, dest);
    1286 }
    1287 
    1288 ALWAYS_INLINE void JIT::emitTagAsBoolImmediate(RegisterID reg)
     1265    return emitJumpIfNotInt(scratch);
     1266}
     1267
     1268ALWAYS_INLINE void JIT::emitJumpSlowCaseIfNotInt(RegisterID reg)
     1269{
     1270    addSlowCase(emitJumpIfNotInt(reg));
     1271}
     1272
     1273ALWAYS_INLINE void JIT::emitJumpSlowCaseIfNotInt(RegisterID reg1, RegisterID reg2, RegisterID scratch)
     1274{
     1275    addSlowCase(emitJumpIfNotInt(reg1, reg2, scratch));
     1276}
     1277
     1278ALWAYS_INLINE void JIT::emitJumpSlowCaseIfNotNumber(RegisterID reg)
     1279{
     1280    addSlowCase(emitJumpIfNotNumber(reg));
     1281}
     1282
     1283ALWAYS_INLINE void JIT::emitTagBool(RegisterID reg)
    12891284{
    12901285    or32(TrustedImm32(static_cast<int32_t>(ValueFalse)), reg);
  • trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp

    r190063 r190230  
    182182    notMasqueradesAsUndefined.link(this);
    183183    done.link(this);
    184     emitTagAsBoolImmediate(regT0);
     184    emitTagBool(regT0);
    185185    emitPutVirtualRegister(dst);
    186186}
     
    194194    xor64(TrustedImm32(static_cast<int32_t>(ValueFalse)), regT0);
    195195    test64(Zero, regT0, TrustedImm32(static_cast<int32_t>(~1)), regT0);
    196     emitTagAsBoolImmediate(regT0);
     196    emitTagBool(regT0);
    197197    emitPutVirtualRegister(dst);
    198198}
     
    205205    emitGetVirtualRegister(value, regT0);
    206206    test64(NonZero, regT0, tagTypeNumberRegister, regT0);
    207     emitTagAsBoolImmediate(regT0);
     207    emitTagBool(regT0);
    208208    emitPutVirtualRegister(dst);
    209209}
     
    218218   
    219219    compare8(Equal, Address(regT0, JSCell::typeInfoTypeOffset()), TrustedImm32(StringType), regT0);
    220     emitTagAsBoolImmediate(regT0);
     220    emitTagBool(regT0);
    221221    Jump done = jump();
    222222   
     
    237237
    238238    compare8(AboveOrEqual, Address(regT0, JSCell::typeInfoTypeOffset()), TrustedImm32(ObjectType), regT0);
    239     emitTagAsBoolImmediate(regT0);
     239    emitTagBool(regT0);
    240240    Jump done = jump();
    241241
     
    304304
    305305    addJump(branch64(Equal, regT0, TrustedImm64(JSValue::encode(jsNumber(0)))), target);
    306     Jump isNonZero = emitJumpIfImmediateInteger(regT0);
     306    Jump isNonZero = emitJumpIfInt(regT0);
    307307
    308308    addJump(branch64(Equal, regT0, TrustedImm64(JSValue::encode(jsBoolean(false)))), target);
     
    371371{
    372372    emitGetVirtualRegisters(currentInstruction[2].u.operand, regT0, currentInstruction[3].u.operand, regT1);
    373     emitJumpSlowCaseIfNotImmediateIntegers(regT0, regT1, regT2);
     373    emitJumpSlowCaseIfNotInt(regT0, regT1, regT2);
    374374    compare32(Equal, regT1, regT0, regT0);
    375     emitTagAsBoolImmediate(regT0);
     375    emitTagBool(regT0);
    376376    emitPutVirtualRegister(currentInstruction[1].u.operand);
    377377}
     
    383383
    384384    Jump isZero = branch64(Equal, regT0, TrustedImm64(JSValue::encode(jsNumber(0))));
    385     addJump(emitJumpIfImmediateInteger(regT0), target);
     385    addJump(emitJumpIfInt(regT0), target);
    386386
    387387    addJump(branch64(Equal, regT0, TrustedImm64(JSValue::encode(jsBoolean(true)))), target);
     
    394394{
    395395    emitGetVirtualRegisters(currentInstruction[2].u.operand, regT0, currentInstruction[3].u.operand, regT1);
    396     emitJumpSlowCaseIfNotImmediateIntegers(regT0, regT1, regT2);
     396    emitJumpSlowCaseIfNotInt(regT0, regT1, regT2);
    397397    compare32(NotEqual, regT1, regT0, regT0);
    398     emitTagAsBoolImmediate(regT0);
     398    emitTagBool(regT0);
    399399
    400400    emitPutVirtualRegister(currentInstruction[1].u.operand);
     
    405405{
    406406    emitGetVirtualRegisters(currentInstruction[2].u.operand, regT0, currentInstruction[3].u.operand, regT1);
    407     emitJumpSlowCaseIfNotImmediateIntegers(regT0, regT1, regT2);
     407    emitJumpSlowCaseIfNotInt(regT0, regT1, regT2);
    408408    xor64(regT1, regT0);
    409     emitFastArithReTagImmediate(regT0, regT0);
     409    emitTagInt(regT0, regT0);
    410410    emitPutVirtualRegister(currentInstruction[1].u.operand);
    411411}
     
    414414{
    415415    emitGetVirtualRegisters(currentInstruction[2].u.operand, regT0, currentInstruction[3].u.operand, regT1);
    416     emitJumpSlowCaseIfNotImmediateIntegers(regT0, regT1, regT2);
     416    emitJumpSlowCaseIfNotInt(regT0, regT1, regT2);
    417417    or64(regT1, regT0);
    418418    emitPutVirtualRegister(currentInstruction[1].u.operand);
     
    449449    // Jump slow if either is a double. First test if it's an integer, which is fine, and then test
    450450    // if it's a double.
    451     Jump leftOK = emitJumpIfImmediateInteger(regT0);
    452     addSlowCase(emitJumpIfImmediateNumber(regT0));
     451    Jump leftOK = emitJumpIfInt(regT0);
     452    addSlowCase(emitJumpIfNumber(regT0));
    453453    leftOK.link(this);
    454     Jump rightOK = emitJumpIfImmediateInteger(regT1);
    455     addSlowCase(emitJumpIfImmediateNumber(regT1));
     454    Jump rightOK = emitJumpIfInt(regT1);
     455    addSlowCase(emitJumpIfNumber(regT1));
    456456    rightOK.link(this);
    457457
     
    460460    else
    461461        compare64(NotEqual, regT1, regT0, regT0);
    462     emitTagAsBoolImmediate(regT0);
     462    emitTagBool(regT0);
    463463
    464464    emitPutVirtualRegister(dst);
     
    480480    emitGetVirtualRegister(srcVReg, regT0);
    481481   
    482     addSlowCase(emitJumpIfNotImmediateNumber(regT0));
     482    addSlowCase(emitJumpIfNotNumber(regT0));
    483483
    484484    emitPutVirtualRegister(currentInstruction[1].u.operand);
     
    622622    wasNotMasqueradesAsUndefined.link(this);
    623623
    624     emitTagAsBoolImmediate(regT0);
     624    emitTagBool(regT0);
    625625    emitPutVirtualRegister(dst);
    626626
     
    654654    wasNotMasqueradesAsUndefined.link(this);
    655655
    656     emitTagAsBoolImmediate(regT0);
     656    emitTagBool(regT0);
    657657    emitPutVirtualRegister(dst);
    658658}
     
    832832    linkSlowCase(iter);
    833833    callOperation(operationCompareEq, regT0, regT1);
    834     emitTagAsBoolImmediate(returnValueGPR);
     834    emitTagBool(returnValueGPR);
    835835    emitPutVirtualRegister(currentInstruction[1].u.operand, returnValueGPR);
    836836}
     
    841841    callOperation(operationCompareEq, regT0, regT1);
    842842    xor32(TrustedImm32(0x1), regT0);
    843     emitTagAsBoolImmediate(returnValueGPR);
     843    emitTagBool(returnValueGPR);
    844844    emitPutVirtualRegister(currentInstruction[1].u.operand, returnValueGPR);
    845845}
     
    12861286        jumpToEnd.append(branch64(Equal, regT1, TrustedImm64(ValueFalse)));
    12871287    } else if (cachedTypeLocation->m_lastSeenType == TypeMachineInt)
    1288         jumpToEnd.append(emitJumpIfImmediateInteger(regT0));
     1288        jumpToEnd.append(emitJumpIfInt(regT0));
    12891289    else if (cachedTypeLocation->m_lastSeenType == TypeNumber)
    1290         jumpToEnd.append(emitJumpIfImmediateNumber(regT0));
     1290        jumpToEnd.append(emitJumpIfNumber(regT0));
    12911291    else if (cachedTypeLocation->m_lastSeenType == TypeString) {
    12921292        Jump isNotCell = emitJumpIfNotJSCell(regT0);
  • trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp

    r189995 r190230  
    5454
    5555    emitFunctionPrologue();
    56     emitPutImmediateToCallFrameHeader(0, JSStack::CodeBlock);
     56    emitPutToCallFrameHeader(0, JSStack::CodeBlock);
    5757    storePtr(callFrameRegister, &m_vm->topCallFrame);
    5858
  • trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp

    r190129 r190230  
    105105    emitJumpSlowCaseIfNotJSCell(regT0, base);
    106106
    107     PatchableJump notIndex = emitPatchableJumpIfNotImmediateInteger(regT1);
     107    PatchableJump notIndex = emitPatchableJumpIfNotInt(regT1);
    108108    addSlowCase(notIndex);
    109109
     
    302302    emitGetVirtualRegisters(base, regT0, property, regT1);
    303303    emitJumpSlowCaseIfNotJSCell(regT0, base);
    304     PatchableJump notIndex = emitPatchableJumpIfNotImmediateInteger(regT1);
     304    PatchableJump notIndex = emitPatchableJumpIfNotInt(regT1);
    305305    addSlowCase(notIndex);
    306306    // See comment in op_get_by_val.
     
    355355    switch (indexingShape) {
    356356    case Int32Shape:
    357         slowCases.append(emitJumpIfNotImmediateInteger(regT3));
     357        slowCases.append(emitJumpIfNotInt(regT3));
    358358        store64(regT3, BaseIndex(regT2, regT1, TimesEight));
    359359        break;
    360360    case DoubleShape: {
    361         Jump notInt = emitJumpIfNotImmediateInteger(regT3);
     361        Jump notInt = emitJumpIfNotInt(regT3);
    362362        convertInt32ToDouble(regT3, fpRegT0);
    363363        Jump ready = jump();
     
    618618    emitGetVirtualRegisters(baseVReg, regT0, valueVReg, regT1);
    619619
    620     // Jump to a slow case if either the base object is an immediate, or if the Structure does not match.
    621620    emitJumpSlowCaseIfNotJSCell(regT0, baseVReg);
    622621
     
    16311630#if USE(JSVALUE64)
    16321631    emitGetVirtualRegister(value, earlyScratch);
    1633     slowCases.append(emitJumpIfNotImmediateInteger(earlyScratch));
     1632    slowCases.append(emitJumpIfNotInt(earlyScratch));
    16341633#else
    16351634    emitLoad(value, lateScratch, earlyScratch);
     
    17031702#if USE(JSVALUE64)
    17041703    emitGetVirtualRegister(value, earlyScratch);
    1705     Jump doubleCase = emitJumpIfNotImmediateInteger(earlyScratch);
     1704    Jump doubleCase = emitJumpIfNotInt(earlyScratch);
    17061705    convertInt32ToDouble(earlyScratch, fpRegT0);
    17071706    Jump ready = jump();
    17081707    doubleCase.link(this);
    1709     slowCases.append(emitJumpIfNotImmediateNumber(earlyScratch));
     1708    slowCases.append(emitJumpIfNotNumber(earlyScratch));
    17101709    add64(tagTypeNumberRegister, earlyScratch);
    17111710    move64ToDouble(earlyScratch, fpRegT0);
  • trunk/Source/JavaScriptCore/jit/JSInterfaceJIT.h

    r182151 r190230  
    6666#if USE(JSVALUE64)
    6767        Jump emitJumpIfNotJSCell(RegisterID);
    68         Jump emitJumpIfImmediateNumber(RegisterID reg);
    69         Jump emitJumpIfNotImmediateNumber(RegisterID reg);
    70         void emitFastArithImmToInt(RegisterID reg);
    71         void emitFastArithIntToImmNoCheck(RegisterID src, RegisterID dest);
     68        Jump emitJumpIfNumber(RegisterID);
     69        Jump emitJumpIfNotNumber(RegisterID);
     70        void emitTagInt(RegisterID src, RegisterID dest);
    7271#endif
    7372
     
    7675        void emitGetFromCallFrameHeaderPtr(JSStack::CallFrameHeaderEntry, RegisterID to, RegisterID from = callFrameRegister);
    7776        void emitPutToCallFrameHeader(RegisterID from, JSStack::CallFrameHeaderEntry);
    78         void emitPutImmediateToCallFrameHeader(void* value, JSStack::CallFrameHeaderEntry);
     77        void emitPutToCallFrameHeader(void* value, JSStack::CallFrameHeaderEntry);
    7978        void emitPutCellToCallFrameHeader(RegisterID from, JSStack::CallFrameHeaderEntry);
    8079
     
    155154    }
    156155
    157     ALWAYS_INLINE JSInterfaceJIT::Jump JSInterfaceJIT::emitJumpIfImmediateNumber(RegisterID reg)
     156    ALWAYS_INLINE JSInterfaceJIT::Jump JSInterfaceJIT::emitJumpIfNumber(RegisterID reg)
    158157    {
    159158        return branchTest64(NonZero, reg, tagTypeNumberRegister);
    160159    }
    161     ALWAYS_INLINE JSInterfaceJIT::Jump JSInterfaceJIT::emitJumpIfNotImmediateNumber(RegisterID reg)
     160    ALWAYS_INLINE JSInterfaceJIT::Jump JSInterfaceJIT::emitJumpIfNotNumber(RegisterID reg)
    162161    {
    163162        return branchTest64(Zero, reg, tagTypeNumberRegister);
     
    180179    {
    181180        load64(addressFor(virtualRegisterIndex), scratch);
    182         Jump notNumber = emitJumpIfNotImmediateNumber(scratch);
     181        Jump notNumber = emitJumpIfNotNumber(scratch);
    183182        Jump notInt = branch64(Below, scratch, tagTypeNumberRegister);
    184183        convertInt32ToDouble(scratch, dst);
     
    191190    }
    192191
    193     ALWAYS_INLINE void JSInterfaceJIT::emitFastArithImmToInt(RegisterID)
    194     {
    195     }
    196    
    197192    // operand is int32_t, must have been zero-extended if register is 64-bit.
    198     ALWAYS_INLINE void JSInterfaceJIT::emitFastArithIntToImmNoCheck(RegisterID src, RegisterID dest)
     193    ALWAYS_INLINE void JSInterfaceJIT::emitTagInt(RegisterID src, RegisterID dest)
    199194    {
    200195        if (src != dest)
     
    242237    }
    243238
    244     ALWAYS_INLINE void JSInterfaceJIT::emitPutImmediateToCallFrameHeader(void* value, JSStack::CallFrameHeaderEntry entry)
     239    ALWAYS_INLINE void JSInterfaceJIT::emitPutToCallFrameHeader(void* value, JSStack::CallFrameHeaderEntry entry)
    245240    {
    246241        storePtr(TrustedImmPtr(value), Address(callFrameRegister, entry * sizeof(Register)));
  • trunk/Source/JavaScriptCore/jit/ThunkGenerators.cpp

    r189999 r190230  
    258258#endif
    259259
    260     jit.emitPutImmediateToCallFrameHeader(0, JSStack::CodeBlock);
     260    jit.emitPutToCallFrameHeader(0, JSStack::CodeBlock);
    261261    jit.storePtr(JSInterfaceJIT::callFrameRegister, &vm->topCallFrame);
    262262
  • trunk/Source/JavaScriptCore/wasm/WASMFunctionCompiler.h

    r190130 r190230  
    129129
    130130        emitFunctionPrologue();
    131         emitPutImmediateToCallFrameHeader(m_codeBlock, JSStack::CodeBlock);
     131        emitPutToCallFrameHeader(m_codeBlock, JSStack::CodeBlock);
    132132
    133133        m_beginLabel = label();
     
    216216        Label arityCheck = label();
    217217        emitFunctionPrologue();
    218         emitPutImmediateToCallFrameHeader(m_codeBlock, JSStack::CodeBlock);
     218        emitPutToCallFrameHeader(m_codeBlock, JSStack::CodeBlock);
    219219        jump(m_beginLabel);
    220220
Note: See TracChangeset for help on using the changeset viewer.