Changeset 155418 in webkit


Ignore:
Timestamp:
Sep 9, 2013 11:01:03 PM (11 years ago)
Author:
msaboff@apple.com
Message:

Change virtual register function arguments from unsigned to int
https://bugs.webkit.org/show_bug.cgi?id=121055

Reviewed by Filip Pizlo.

This is a largely mechanical change. This changes function paramaters and local variables used to
represent bytecode operands from being unsigned to be int.

  • bytecode/CodeOrigin.h:
  • dfg/DFGByteCodeParser.cpp:
  • jit/JIT.h:
  • jit/JITArithmetic.cpp:
  • jit/JITArithmetic32_64.cpp:
  • jit/JITInlines.h:
  • jit/JITOpcodes.cpp:
  • jit/JITOpcodes32_64.cpp:
  • jit/JITPropertyAccess.cpp:
  • jit/JITPropertyAccess32_64.cpp:
  • jit/JITStubCall.h:
Location:
trunk/Source/JavaScriptCore
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r155415 r155418  
     12013-09-09  Michael Saboff  <msaboff@apple.com>
     2
     3        Change virtual register function arguments from unsigned to int
     4        https://bugs.webkit.org/show_bug.cgi?id=121055
     5
     6        Reviewed by Filip Pizlo.
     7
     8        This is a largely mechanical change.  This changes function paramaters and local variables used to
     9        represent bytecode operands from being unsigned to be int.
     10
     11        * bytecode/CodeOrigin.h:
     12        * dfg/DFGByteCodeParser.cpp:
     13        * jit/JIT.h:
     14        * jit/JITArithmetic.cpp:
     15        * jit/JITArithmetic32_64.cpp:
     16        * jit/JITInlines.h:
     17        * jit/JITOpcodes.cpp:
     18        * jit/JITOpcodes32_64.cpp:
     19        * jit/JITPropertyAccess.cpp:
     20        * jit/JITPropertyAccess32_64.cpp:
     21        * jit/JITStubCall.h:
     22
    1232013-09-09  Michael Saboff  <msaboff@apple.com>
    224
  • trunk/Source/JavaScriptCore/bytecode/CodeOrigin.h

    r153296 r155418  
    9898    CodeOrigin caller;
    9999    BitVector capturedVars; // Indexed by the machine call frame's variable numbering.
    100     unsigned stackOffset : 31;
     100    signed int stackOffset : 31;
    101101    bool isCall : 1;
    102102   
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r155415 r155418  
    215215
    216216        // Must be a local.
    217         return getLocal((unsigned)operand);
    218     }
     217        return getLocal(operand);
     218    }
     219
    219220    Node* get(int operand)
    220221    {
     
    228229        return getDirect(m_inlineStackTop->remapOperand(operand));
    229230    }
     231
    230232    enum SetMode { NormalSet, SetOnEntry };
    231233    void setDirect(int operand, Node* value, SetMode setMode = NormalSet)
     
    238240
    239241        // Must be a local.
    240         setLocal((unsigned)operand, value, setMode);
    241     }
     242        setLocal(operand, value, setMode);
     243    }
     244
    242245    void set(int operand, Node* value, SetMode setMode = NormalSet)
    243246    {
     
    260263
    261264    // Used in implementing get/set, above, where the operand is a local variable.
    262     Node* getLocal(unsigned operand)
     265    Node* getLocal(int operand)
    263266    {
    264267        unsigned local = operandToLocal(operand);
     
    297300        return node;
    298301    }
    299     void setLocal(unsigned operand, Node* value, SetMode setMode = NormalSet)
     302
     303    void setLocal(int operand, Node* value, SetMode setMode = NormalSet)
    300304    {
    301305        unsigned local = operandToLocal(operand);
     
    20902094
    20912095        case op_inc: {
    2092             unsigned srcDst = currentInstruction[1].u.operand;
     2096            int srcDst = currentInstruction[1].u.operand;
    20932097            Node* op = get(srcDst);
    20942098            set(srcDst, makeSafe(addToGraph(ArithAdd, op, one())));
     
    20972101
    20982102        case op_dec: {
    2099             unsigned srcDst = currentInstruction[1].u.operand;
     2103            int srcDst = currentInstruction[1].u.operand;
    21002104            Node* op = get(srcDst);
    21012105            set(srcDst, makeSafe(addToGraph(ArithSub, op, one())));
     
    29973001
    29983002        case op_resolve_scope: {
    2999             unsigned dst = currentInstruction[1].u.operand;
     3003            int dst = currentInstruction[1].u.operand;
    30003004            ResolveType resolveType = static_cast<ResolveType>(currentInstruction[3].u.operand);
    30013005            unsigned depth = currentInstruction[4].u.operand;
     
    30243028
    30253029        case op_get_from_scope: {
    3026             unsigned dst = currentInstruction[1].u.operand;
     3030            int dst = currentInstruction[1].u.operand;
    30273031            unsigned scope = currentInstruction[2].u.operand;
    30283032            unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[currentInstruction[3].u.operand];
  • trunk/Source/JavaScriptCore/jit/JIT.h

    r155399 r155418  
    439439        enum CompileOpStrictEqType { OpStrictEq, OpNStrictEq };
    440440        void compileOpStrictEq(Instruction* instruction, CompileOpStrictEqType type);
    441         bool isOperandConstantImmediateDouble(unsigned src);
     441        bool isOperandConstantImmediateDouble(int src);
    442442       
    443443        void emitLoadDouble(int index, FPRegisterID value);
     
    510510
    511511#if USE(JSVALUE32_64)
    512         bool getOperandConstantImmediateInt(unsigned op1, unsigned op2, unsigned& op, int32_t& constant);
     512        bool getOperandConstantImmediateInt(int op1, int op2, int& op, int32_t& constant);
    513513
    514514        void emitLoadTag(int index, RegisterID tag);
     
    547547
    548548        // Arithmetic opcode helpers
    549         void emitAdd32Constant(unsigned dst, unsigned op, int32_t constant, ResultType opType);
    550         void emitSub32Constant(unsigned dst, unsigned op, int32_t constant, ResultType opType);
    551         void emitBinaryDoubleOp(OpcodeID, unsigned dst, unsigned op1, unsigned op2, OperandTypes, JumpList& notInt32Op1, JumpList& notInt32Op2, bool op1IsInRegisters = true, bool op2IsInRegisters = true);
     549        void emitAdd32Constant(int dst, int op, int32_t constant, ResultType opType);
     550        void emitSub32Constant(int dst, int op, int32_t constant, ResultType opType);
     551        void emitBinaryDoubleOp(OpcodeID, int dst, int op1, int op2, OperandTypes, JumpList& notInt32Op1, JumpList& notInt32Op2, bool op1IsInRegisters = true, bool op2IsInRegisters = true);
    552552
    553553#if CPU(ARM_TRADITIONAL)
     
    581581#else // USE(JSVALUE32_64)
    582582        /* This function is deprecated. */
    583         void emitGetJITStubArg(unsigned argumentNumber, RegisterID dst);
     583        void emitGetJITStubArg(int argumentNumber, RegisterID dst);
    584584
    585585        void emitGetVirtualRegister(int src, RegisterID dst);
    586586        void emitGetVirtualRegisters(int src1, RegisterID dst1, int src2, RegisterID dst2);
    587         void emitPutVirtualRegister(unsigned dst, RegisterID from = regT0);
    588         void emitStoreCell(unsigned dst, RegisterID payload, bool /* only used in JSValue32_64 */ = false)
     587        void emitPutVirtualRegister(int dst, RegisterID from = regT0);
     588        void emitStoreCell(int dst, RegisterID payload, bool /* only used in JSValue32_64 */ = false)
    589589        {
    590590            emitPutVirtualRegister(dst, payload);
    591591        }
    592592
    593         int32_t getConstantOperandImmediateInt(unsigned src);
     593        int32_t getConstantOperandImmediateInt(int src);
    594594
    595595        void killLastResultRegister();
     
    610610
    611611        void emitTagAsBoolImmediate(RegisterID reg);
    612         void compileBinaryArithOp(OpcodeID, unsigned dst, unsigned src1, unsigned src2, OperandTypes opi);
    613         void compileBinaryArithOpSlowCase(Instruction*, OpcodeID, Vector<SlowCaseEntry>::iterator&, unsigned dst, unsigned src1, unsigned src2, OperandTypes, bool op1HasImmediateIntFastCase, bool op2HasImmediateIntFastCase);
     612        void compileBinaryArithOp(OpcodeID, int dst, int src1, int src2, OperandTypes opi);
     613        void compileBinaryArithOpSlowCase(Instruction*, OpcodeID, Vector<SlowCaseEntry>::iterator&, int dst, int src1, int src2, OperandTypes, bool op1HasImmediateIntFastCase, bool op2HasImmediateIntFastCase);
    614614
    615615        void compileGetByIdHotPath(int baseVReg, const Identifier*);
     
    636636#endif
    637637
    638         void emit_compareAndJump(OpcodeID, unsigned op1, unsigned op2, unsigned target, RelationalCondition);
    639         void emit_compareAndJumpSlow(unsigned op1, unsigned op2, unsigned target, DoubleCondition, int (JIT_STUB *stub)(STUB_ARGS_DECLARATION), bool invert, Vector<SlowCaseEntry>::iterator&);
     638        void emit_compareAndJump(OpcodeID, int op1, int op2, unsigned target, RelationalCondition);
     639        void emit_compareAndJumpSlow(int op1, int op2, unsigned target, DoubleCondition, int (JIT_STUB *stub)(STUB_ARGS_DECLARATION), bool invert, Vector<SlowCaseEntry>::iterator&);
    640640
    641641        void emit_op_add(Instruction*);
     
    795795
    796796        void emitVarInjectionCheck(bool needsVarInjectionChecks);
    797         void emitResolveClosure(unsigned dst, bool needsVarInjectionChecks, unsigned depth);
    798         void emitLoadWithStructureCheck(unsigned scope, Structure** structureSlot);
     797        void emitResolveClosure(int dst, bool needsVarInjectionChecks, unsigned depth);
     798        void emitLoadWithStructureCheck(int scope, Structure** structureSlot);
    799799        void emitGetGlobalProperty(uintptr_t* operandSlot);
    800800        void emitGetGlobalVar(uintptr_t operand);
    801         void emitGetClosureVar(unsigned scope, uintptr_t operand);
    802         void emitPutGlobalProperty(uintptr_t* operandSlot, unsigned value);
    803         void emitPutGlobalVar(uintptr_t operand, unsigned value);
    804         void emitPutClosureVar(unsigned scope, uintptr_t operand, unsigned value);
    805 
    806         void emitInitRegister(unsigned dst);
     801        void emitGetClosureVar(int scope, uintptr_t operand);
     802        void emitPutGlobalProperty(uintptr_t* operandSlot, int value);
     803        void emitPutGlobalVar(uintptr_t operand, int value);
     804        void emitPutClosureVar(int scope, uintptr_t operand, int value);
     805
     806        void emitInitRegister(int dst);
    807807
    808808        void emitPutIntToCallFrameHeader(RegisterID from, JSStack::CallFrameHeaderEntry);
     
    813813#endif
    814814
    815         JSValue getConstantOperand(unsigned src);
    816         bool isOperandConstantImmediateInt(unsigned src);
    817         bool isOperandConstantImmediateChar(unsigned src);
     815        JSValue getConstantOperand(int src);
     816        bool isOperandConstantImmediateInt(int src);
     817        bool isOperandConstantImmediateChar(int src);
    818818
    819819        bool atJumpTarget();
     
    852852
    853853#ifndef NDEBUG
    854         void printBytecodeOperandTypes(unsigned src1, unsigned src2);
     854        void printBytecodeOperandTypes(int src1, int src2);
    855855#endif
    856856
  • trunk/Source/JavaScriptCore/jit/JITArithmetic.cpp

    r153222 r155418  
    5151void JIT::emit_op_jless(Instruction* currentInstruction)
    5252{
    53     unsigned op1 = currentInstruction[1].u.operand;
    54     unsigned op2 = currentInstruction[2].u.operand;
     53    int op1 = currentInstruction[1].u.operand;
     54    int op2 = currentInstruction[2].u.operand;
    5555    unsigned target = currentInstruction[3].u.operand;
    5656
     
    6060void JIT::emit_op_jlesseq(Instruction* currentInstruction)
    6161{
    62     unsigned op1 = currentInstruction[1].u.operand;
    63     unsigned op2 = currentInstruction[2].u.operand;
     62    int op1 = currentInstruction[1].u.operand;
     63    int op2 = currentInstruction[2].u.operand;
    6464    unsigned target = currentInstruction[3].u.operand;
    6565
     
    6969void JIT::emit_op_jgreater(Instruction* currentInstruction)
    7070{
    71     unsigned op1 = currentInstruction[1].u.operand;
    72     unsigned op2 = currentInstruction[2].u.operand;
     71    int op1 = currentInstruction[1].u.operand;
     72    int op2 = currentInstruction[2].u.operand;
    7373    unsigned target = currentInstruction[3].u.operand;
    7474
     
    7878void JIT::emit_op_jgreatereq(Instruction* currentInstruction)
    7979{
    80     unsigned op1 = currentInstruction[1].u.operand;
    81     unsigned op2 = currentInstruction[2].u.operand;
     80    int op1 = currentInstruction[1].u.operand;
     81    int op2 = currentInstruction[2].u.operand;
    8282    unsigned target = currentInstruction[3].u.operand;
    8383
     
    8787void JIT::emit_op_jnless(Instruction* currentInstruction)
    8888{
    89     unsigned op1 = currentInstruction[1].u.operand;
    90     unsigned op2 = currentInstruction[2].u.operand;
     89    int op1 = currentInstruction[1].u.operand;
     90    int op2 = currentInstruction[2].u.operand;
    9191    unsigned target = currentInstruction[3].u.operand;
    9292
     
    9696void JIT::emit_op_jnlesseq(Instruction* currentInstruction)
    9797{
    98     unsigned op1 = currentInstruction[1].u.operand;
    99     unsigned op2 = currentInstruction[2].u.operand;
     98    int op1 = currentInstruction[1].u.operand;
     99    int op2 = currentInstruction[2].u.operand;
    100100    unsigned target = currentInstruction[3].u.operand;
    101101
     
    105105void JIT::emit_op_jngreater(Instruction* currentInstruction)
    106106{
    107     unsigned op1 = currentInstruction[1].u.operand;
    108     unsigned op2 = currentInstruction[2].u.operand;
     107    int op1 = currentInstruction[1].u.operand;
     108    int op2 = currentInstruction[2].u.operand;
    109109    unsigned target = currentInstruction[3].u.operand;
    110110
     
    114114void JIT::emit_op_jngreatereq(Instruction* currentInstruction)
    115115{
    116     unsigned op1 = currentInstruction[1].u.operand;
    117     unsigned op2 = currentInstruction[2].u.operand;
     116    int op1 = currentInstruction[1].u.operand;
     117    int op2 = currentInstruction[2].u.operand;
    118118    unsigned target = currentInstruction[3].u.operand;
    119119
     
    123123void JIT::emitSlow_op_jless(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    124124{
    125     unsigned op1 = currentInstruction[1].u.operand;
    126     unsigned op2 = currentInstruction[2].u.operand;
     125    int op1 = currentInstruction[1].u.operand;
     126    int op2 = currentInstruction[2].u.operand;
    127127    unsigned target = currentInstruction[3].u.operand;
    128128
     
    132132void JIT::emitSlow_op_jlesseq(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    133133{
    134     unsigned op1 = currentInstruction[1].u.operand;
    135     unsigned op2 = currentInstruction[2].u.operand;
     134    int op1 = currentInstruction[1].u.operand;
     135    int op2 = currentInstruction[2].u.operand;
    136136    unsigned target = currentInstruction[3].u.operand;
    137137
     
    141141void JIT::emitSlow_op_jgreater(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    142142{
    143     unsigned op1 = currentInstruction[1].u.operand;
    144     unsigned op2 = currentInstruction[2].u.operand;
     143    int op1 = currentInstruction[1].u.operand;
     144    int op2 = currentInstruction[2].u.operand;
    145145    unsigned target = currentInstruction[3].u.operand;
    146146
     
    150150void JIT::emitSlow_op_jgreatereq(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    151151{
    152     unsigned op1 = currentInstruction[1].u.operand;
    153     unsigned op2 = currentInstruction[2].u.operand;
     152    int op1 = currentInstruction[1].u.operand;
     153    int op2 = currentInstruction[2].u.operand;
    154154    unsigned target = currentInstruction[3].u.operand;
    155155
     
    159159void JIT::emitSlow_op_jnless(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    160160{
    161     unsigned op1 = currentInstruction[1].u.operand;
    162     unsigned op2 = currentInstruction[2].u.operand;
     161    int op1 = currentInstruction[1].u.operand;
     162    int op2 = currentInstruction[2].u.operand;
    163163    unsigned target = currentInstruction[3].u.operand;
    164164
     
    168168void JIT::emitSlow_op_jnlesseq(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    169169{
    170     unsigned op1 = currentInstruction[1].u.operand;
    171     unsigned op2 = currentInstruction[2].u.operand;
     170    int op1 = currentInstruction[1].u.operand;
     171    int op2 = currentInstruction[2].u.operand;
    172172    unsigned target = currentInstruction[3].u.operand;
    173173
     
    177177void JIT::emitSlow_op_jngreater(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    178178{
    179     unsigned op1 = currentInstruction[1].u.operand;
    180     unsigned op2 = currentInstruction[2].u.operand;
     179    int op1 = currentInstruction[1].u.operand;
     180    int op2 = currentInstruction[2].u.operand;
    181181    unsigned target = currentInstruction[3].u.operand;
    182182
     
    186186void JIT::emitSlow_op_jngreatereq(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    187187{
    188     unsigned op1 = currentInstruction[1].u.operand;
    189     unsigned op2 = currentInstruction[2].u.operand;
     188    int op1 = currentInstruction[1].u.operand;
     189    int op2 = currentInstruction[2].u.operand;
    190190    unsigned target = currentInstruction[3].u.operand;
    191191
     
    197197void JIT::emit_op_negate(Instruction* currentInstruction)
    198198{
    199     unsigned dst = currentInstruction[1].u.operand;
    200     unsigned src = currentInstruction[2].u.operand;
     199    int dst = currentInstruction[1].u.operand;
     200    int src = currentInstruction[2].u.operand;
    201201
    202202    emitGetVirtualRegister(src, regT0);
     
    221221void JIT::emitSlow_op_negate(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    222222{
    223     unsigned result = currentInstruction[1].u.operand;
     223    int result = currentInstruction[1].u.operand;
    224224
    225225    linkSlowCase(iter); // 0x7fffffff check
     
    233233void JIT::emit_op_lshift(Instruction* currentInstruction)
    234234{
    235     unsigned result = currentInstruction[1].u.operand;
    236     unsigned op1 = currentInstruction[2].u.operand;
    237     unsigned op2 = currentInstruction[3].u.operand;
     235    int result = currentInstruction[1].u.operand;
     236    int op1 = currentInstruction[2].u.operand;
     237    int op2 = currentInstruction[3].u.operand;
    238238
    239239    emitGetVirtualRegisters(op1, regT0, op2, regT2);
     
    250250void JIT::emitSlow_op_lshift(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    251251{
    252     unsigned result = currentInstruction[1].u.operand;
     252    int result = currentInstruction[1].u.operand;
    253253
    254254    linkSlowCase(iter);
     
    261261void JIT::emit_op_rshift(Instruction* currentInstruction)
    262262{
    263     unsigned result = currentInstruction[1].u.operand;
    264     unsigned op1 = currentInstruction[2].u.operand;
    265     unsigned op2 = currentInstruction[3].u.operand;
     263    int result = currentInstruction[1].u.operand;
     264    int op1 = currentInstruction[2].u.operand;
     265    int op2 = currentInstruction[3].u.operand;
    266266
    267267    if (isOperandConstantImmediateInt(op2)) {
     
    296296void JIT::emitSlow_op_rshift(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    297297{
    298     unsigned result = currentInstruction[1].u.operand;
    299     unsigned op1 = currentInstruction[2].u.operand;
    300     unsigned op2 = currentInstruction[3].u.operand;
     298    int result = currentInstruction[1].u.operand;
     299    int op1 = currentInstruction[2].u.operand;
     300    int op2 = currentInstruction[3].u.operand;
    301301
    302302    UNUSED_PARAM(op1);
     
    323323void JIT::emit_op_urshift(Instruction* currentInstruction)
    324324{
    325     unsigned dst = currentInstruction[1].u.operand;
    326     unsigned op1 = currentInstruction[2].u.operand;
    327     unsigned op2 = currentInstruction[3].u.operand;
     325    int dst = currentInstruction[1].u.operand;
     326    int op1 = currentInstruction[2].u.operand;
     327    int op2 = currentInstruction[3].u.operand;
    328328
    329329    // Slow case of urshift makes assumptions about what registers hold the
     
    359359void JIT::emitSlow_op_urshift(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    360360{
    361     unsigned dst = currentInstruction[1].u.operand;
    362     unsigned op1 = currentInstruction[2].u.operand;
    363     unsigned op2 = currentInstruction[3].u.operand;
     361    int dst = currentInstruction[1].u.operand;
     362    int op1 = currentInstruction[2].u.operand;
     363    int op2 = currentInstruction[3].u.operand;
    364364    if (isOperandConstantImmediateInt(op2)) {
    365365        int shift = getConstantOperand(op2).asInt32();
     
    414414}
    415415
    416 void JIT::emit_compareAndJump(OpcodeID, unsigned op1, unsigned op2, unsigned target, RelationalCondition condition)
     416void JIT::emit_compareAndJump(OpcodeID, int op1, int op2, unsigned target, RelationalCondition condition)
    417417{
    418418    // We generate inline code for the following cases in the fast path:
     
    458458}
    459459
    460 void JIT::emit_compareAndJumpSlow(unsigned op1, unsigned op2, unsigned target, DoubleCondition condition, int (JIT_STUB *stub)(STUB_ARGS_DECLARATION), bool invert, Vector<SlowCaseEntry>::iterator& iter)
     460void JIT::emit_compareAndJumpSlow(int op1, int op2, unsigned target, DoubleCondition condition, int (JIT_STUB *stub)(STUB_ARGS_DECLARATION), bool invert, Vector<SlowCaseEntry>::iterator& iter)
    461461{
    462462    COMPILE_ASSERT(OPCODE_LENGTH(op_jless) == OPCODE_LENGTH(op_jlesseq), OPCODE_LENGTH_op_jlesseq_equals_op_jless);
     
    568568void JIT::emit_op_bitand(Instruction* currentInstruction)
    569569{
    570     unsigned result = currentInstruction[1].u.operand;
    571     unsigned op1 = currentInstruction[2].u.operand;
    572     unsigned op2 = currentInstruction[3].u.operand;
     570    int result = currentInstruction[1].u.operand;
     571    int op1 = currentInstruction[2].u.operand;
     572    int op2 = currentInstruction[3].u.operand;
    573573
    574574    if (isOperandConstantImmediateInt(op1)) {
     
    596596void JIT::emitSlow_op_bitand(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    597597{
    598     unsigned result = currentInstruction[1].u.operand;
     598    int result = currentInstruction[1].u.operand;
    599599
    600600    linkSlowCase(iter);
     
    607607void JIT::emit_op_inc(Instruction* currentInstruction)
    608608{
    609     unsigned srcDst = currentInstruction[1].u.operand;
     609    int srcDst = currentInstruction[1].u.operand;
    610610
    611611    emitGetVirtualRegister(srcDst, regT0);
     
    618618void JIT::emitSlow_op_inc(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    619619{
    620     unsigned srcDst = currentInstruction[1].u.operand;
     620    int srcDst = currentInstruction[1].u.operand;
    621621
    622622    linkSlowCase(iter);
     
    629629void JIT::emit_op_dec(Instruction* currentInstruction)
    630630{
    631     unsigned srcDst = currentInstruction[1].u.operand;
     631    int srcDst = currentInstruction[1].u.operand;
    632632
    633633    emitGetVirtualRegister(srcDst, regT0);
     
    640640void JIT::emitSlow_op_dec(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    641641{
    642     unsigned srcDst = currentInstruction[1].u.operand;
     642    int srcDst = currentInstruction[1].u.operand;
    643643
    644644    linkSlowCase(iter);
     
    655655void JIT::emit_op_mod(Instruction* currentInstruction)
    656656{
    657     unsigned result = currentInstruction[1].u.operand;
    658     unsigned op1 = currentInstruction[2].u.operand;
    659     unsigned op2 = currentInstruction[3].u.operand;
     657    int result = currentInstruction[1].u.operand;
     658    int op1 = currentInstruction[2].u.operand;
     659    int op2 = currentInstruction[3].u.operand;
    660660
    661661    // Make sure registers are correct for x86 IDIV instructions.
     
    684684void JIT::emitSlow_op_mod(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    685685{
    686     unsigned result = currentInstruction[1].u.operand;
     686    int result = currentInstruction[1].u.operand;
    687687
    688688    linkSlowCase(iter);
     
    700700void JIT::emit_op_mod(Instruction* currentInstruction)
    701701{
    702     unsigned result = currentInstruction[1].u.operand;
    703     unsigned op1 = currentInstruction[2].u.operand;
    704     unsigned op2 = currentInstruction[3].u.operand;
     702    int result = currentInstruction[1].u.operand;
     703    int op1 = currentInstruction[2].u.operand;
     704    int op2 = currentInstruction[3].u.operand;
    705705
    706706    UNUSED_PARAM(op1);
     
    723723/* ------------------------------ BEGIN: USE(JSVALUE64) (OP_ADD, OP_SUB, OP_MUL) ------------------------------ */
    724724
    725 void JIT::compileBinaryArithOp(OpcodeID opcodeID, unsigned, unsigned op1, unsigned op2, OperandTypes)
     725void JIT::compileBinaryArithOp(OpcodeID opcodeID, int, int op1, int op2, OperandTypes)
    726726{
    727727    emitGetVirtualRegisters(op1, regT0, op2, regT1);
     
    769769}
    770770
    771 void JIT::compileBinaryArithOpSlowCase(Instruction* currentInstruction, OpcodeID opcodeID, Vector<SlowCaseEntry>::iterator& iter, unsigned result, unsigned op1, unsigned op2, OperandTypes types, bool op1HasImmediateIntFastCase, bool op2HasImmediateIntFastCase)
     771void JIT::compileBinaryArithOpSlowCase(Instruction* currentInstruction, OpcodeID opcodeID, Vector<SlowCaseEntry>::iterator& iter, int result, int op1, int op2, OperandTypes types, bool op1HasImmediateIntFastCase, bool op2HasImmediateIntFastCase)
    772772{
    773773    // We assume that subtracting TagTypeNumber is equivalent to adding DoubleEncodeOffset.
     
    855855void JIT::emit_op_add(Instruction* currentInstruction)
    856856{
    857     unsigned result = currentInstruction[1].u.operand;
    858     unsigned op1 = currentInstruction[2].u.operand;
    859     unsigned op2 = currentInstruction[3].u.operand;
     857    int result = currentInstruction[1].u.operand;
     858    int op1 = currentInstruction[2].u.operand;
     859    int op2 = currentInstruction[3].u.operand;
    860860    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
    861861
     
    885885void JIT::emitSlow_op_add(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    886886{
    887     unsigned result = currentInstruction[1].u.operand;
    888     unsigned op1 = currentInstruction[2].u.operand;
    889     unsigned op2 = currentInstruction[3].u.operand;
     887    int result = currentInstruction[1].u.operand;
     888    int op1 = currentInstruction[2].u.operand;
     889    int op2 = currentInstruction[3].u.operand;
    890890    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
    891891
     
    902902void JIT::emit_op_mul(Instruction* currentInstruction)
    903903{
    904     unsigned result = currentInstruction[1].u.operand;
    905     unsigned op1 = currentInstruction[2].u.operand;
    906     unsigned op2 = currentInstruction[3].u.operand;
     904    int result = currentInstruction[1].u.operand;
     905    int op1 = currentInstruction[2].u.operand;
     906    int op2 = currentInstruction[3].u.operand;
    907907    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
    908908
     
    935935void JIT::emitSlow_op_mul(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    936936{
    937     unsigned result = currentInstruction[1].u.operand;
    938     unsigned op1 = currentInstruction[2].u.operand;
    939     unsigned op2 = currentInstruction[3].u.operand;
     937    int result = currentInstruction[1].u.operand;
     938    int op1 = currentInstruction[2].u.operand;
     939    int op2 = currentInstruction[3].u.operand;
    940940    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
    941941
     
    947947void JIT::emit_op_div(Instruction* currentInstruction)
    948948{
    949     unsigned dst = currentInstruction[1].u.operand;
    950     unsigned op1 = currentInstruction[2].u.operand;
    951     unsigned op2 = currentInstruction[3].u.operand;
     949    int dst = currentInstruction[1].u.operand;
     950    int op1 = currentInstruction[2].u.operand;
     951    int op2 = currentInstruction[3].u.operand;
    952952    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
    953953
     
    10291029void JIT::emitSlow_op_div(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    10301030{
    1031     unsigned result = currentInstruction[1].u.operand;
    1032     unsigned op1 = currentInstruction[2].u.operand;
    1033     unsigned op2 = currentInstruction[3].u.operand;
     1031    int result = currentInstruction[1].u.operand;
     1032    int op1 = currentInstruction[2].u.operand;
     1033    int op2 = currentInstruction[3].u.operand;
    10341034    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
    10351035    if (types.first().definitelyIsNumber() && types.second().definitelyIsNumber()) {
     
    10551055void JIT::emit_op_sub(Instruction* currentInstruction)
    10561056{
    1057     unsigned result = currentInstruction[1].u.operand;
    1058     unsigned op1 = currentInstruction[2].u.operand;
    1059     unsigned op2 = currentInstruction[3].u.operand;
     1057    int result = currentInstruction[1].u.operand;
     1058    int op1 = currentInstruction[2].u.operand;
     1059    int op2 = currentInstruction[3].u.operand;
    10601060    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
    10611061
     
    10661066void JIT::emitSlow_op_sub(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    10671067{
    1068     unsigned result = currentInstruction[1].u.operand;
    1069     unsigned op1 = currentInstruction[2].u.operand;
    1070     unsigned op2 = currentInstruction[3].u.operand;
     1068    int result = currentInstruction[1].u.operand;
     1069    int op1 = currentInstruction[2].u.operand;
     1070    int op2 = currentInstruction[3].u.operand;
    10711071    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
    10721072
  • trunk/Source/JavaScriptCore/jit/JITArithmetic32_64.cpp

    r153231 r155418  
    5252void JIT::emit_op_negate(Instruction* currentInstruction)
    5353{
    54     unsigned dst = currentInstruction[1].u.operand;
    55     unsigned src = currentInstruction[2].u.operand;
     54    int dst = currentInstruction[1].u.operand;
     55    int src = currentInstruction[2].u.operand;
    5656
    5757    emitLoad(src, regT1, regT0);
     
    7777void JIT::emitSlow_op_negate(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    7878{
    79     unsigned dst = currentInstruction[1].u.operand;
     79    int dst = currentInstruction[1].u.operand;
    8080
    8181    linkSlowCase(iter); // 0x7fffffff check
     
    8787}
    8888
    89 void JIT::emit_compareAndJump(OpcodeID opcode, unsigned op1, unsigned op2, unsigned target, RelationalCondition condition)
     89void JIT::emit_compareAndJump(OpcodeID opcode, int op1, int op2, unsigned target, RelationalCondition condition)
    9090{
    9191    JumpList notInt32Op1;
     
    138138}
    139139
    140 void JIT::emit_compareAndJumpSlow(unsigned op1, unsigned op2, unsigned target, DoubleCondition, int (JIT_STUB *stub)(STUB_ARGS_DECLARATION), bool invert, Vector<SlowCaseEntry>::iterator& iter)
     140void JIT::emit_compareAndJumpSlow(int op1, int op2, unsigned target, DoubleCondition, int (JIT_STUB *stub)(STUB_ARGS_DECLARATION), bool invert, Vector<SlowCaseEntry>::iterator& iter)
    141141{
    142142    if (isOperandConstantImmediateChar(op1) || isOperandConstantImmediateChar(op2)) {
     
    170170void JIT::emit_op_lshift(Instruction* currentInstruction)
    171171{
    172     unsigned dst = currentInstruction[1].u.operand;
    173     unsigned op1 = currentInstruction[2].u.operand;
    174     unsigned op2 = currentInstruction[3].u.operand;
     172    int dst = currentInstruction[1].u.operand;
     173    int op1 = currentInstruction[2].u.operand;
     174    int op2 = currentInstruction[3].u.operand;
    175175
    176176    if (isOperandConstantImmediateInt(op2)) {
     
    192192void JIT::emitSlow_op_lshift(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    193193{
    194     unsigned dst = currentInstruction[1].u.operand;
    195     unsigned op1 = currentInstruction[2].u.operand;
    196     unsigned op2 = currentInstruction[3].u.operand;
     194    int dst = currentInstruction[1].u.operand;
     195    int op1 = currentInstruction[2].u.operand;
     196    int op2 = currentInstruction[3].u.operand;
    197197
    198198    if (!isOperandConstantImmediateInt(op1) && !isOperandConstantImmediateInt(op2))
     
    209209void JIT::emitRightShift(Instruction* currentInstruction, bool isUnsigned)
    210210{
    211     unsigned dst = currentInstruction[1].u.operand;
    212     unsigned op1 = currentInstruction[2].u.operand;
    213     unsigned op2 = currentInstruction[3].u.operand;
     211    int dst = currentInstruction[1].u.operand;
     212    int op1 = currentInstruction[2].u.operand;
     213    int op2 = currentInstruction[3].u.operand;
    214214
    215215    // Slow case of rshift makes assumptions about what registers hold the
     
    243243void JIT::emitRightShiftSlowCase(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter, bool isUnsigned)
    244244{
    245     unsigned dst = currentInstruction[1].u.operand;
    246     unsigned op1 = currentInstruction[2].u.operand;
    247     unsigned op2 = currentInstruction[3].u.operand;
     245    int dst = currentInstruction[1].u.operand;
     246    int op1 = currentInstruction[2].u.operand;
     247    int op2 = currentInstruction[3].u.operand;
    248248    if (isOperandConstantImmediateInt(op2)) {
    249249        int shift = getConstantOperand(op2).asInt32() & 0x1f;
     
    330330void JIT::emit_op_bitand(Instruction* currentInstruction)
    331331{
    332     unsigned dst = currentInstruction[1].u.operand;
    333     unsigned op1 = currentInstruction[2].u.operand;
    334     unsigned op2 = currentInstruction[3].u.operand;
    335 
    336     unsigned op;
     332    int dst = currentInstruction[1].u.operand;
     333    int op1 = currentInstruction[2].u.operand;
     334    int op2 = currentInstruction[3].u.operand;
     335
     336    int op;
    337337    int32_t constant;
    338338    if (getOperandConstantImmediateInt(op1, op2, op, constant)) {
     
    353353void JIT::emitSlow_op_bitand(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    354354{
    355     unsigned dst = currentInstruction[1].u.operand;
    356     unsigned op1 = currentInstruction[2].u.operand;
    357     unsigned op2 = currentInstruction[3].u.operand;
     355    int dst = currentInstruction[1].u.operand;
     356    int op1 = currentInstruction[2].u.operand;
     357    int op2 = currentInstruction[3].u.operand;
    358358
    359359    if (!isOperandConstantImmediateInt(op1) && !isOperandConstantImmediateInt(op2))
     
    370370void JIT::emit_op_bitor(Instruction* currentInstruction)
    371371{
    372     unsigned dst = currentInstruction[1].u.operand;
    373     unsigned op1 = currentInstruction[2].u.operand;
    374     unsigned op2 = currentInstruction[3].u.operand;
    375 
    376     unsigned op;
     372    int dst = currentInstruction[1].u.operand;
     373    int op1 = currentInstruction[2].u.operand;
     374    int op2 = currentInstruction[3].u.operand;
     375
     376    int op;
    377377    int32_t constant;
    378378    if (getOperandConstantImmediateInt(op1, op2, op, constant)) {
     
    393393void JIT::emitSlow_op_bitor(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    394394{
    395     unsigned dst = currentInstruction[1].u.operand;
    396     unsigned op1 = currentInstruction[2].u.operand;
    397     unsigned op2 = currentInstruction[3].u.operand;
     395    int dst = currentInstruction[1].u.operand;
     396    int op1 = currentInstruction[2].u.operand;
     397    int op2 = currentInstruction[3].u.operand;
    398398
    399399    if (!isOperandConstantImmediateInt(op1) && !isOperandConstantImmediateInt(op2))
     
    410410void JIT::emit_op_bitxor(Instruction* currentInstruction)
    411411{
    412     unsigned dst = currentInstruction[1].u.operand;
    413     unsigned op1 = currentInstruction[2].u.operand;
    414     unsigned op2 = currentInstruction[3].u.operand;
    415 
    416     unsigned op;
     412    int dst = currentInstruction[1].u.operand;
     413    int op1 = currentInstruction[2].u.operand;
     414    int op2 = currentInstruction[3].u.operand;
     415
     416    int op;
    417417    int32_t constant;
    418418    if (getOperandConstantImmediateInt(op1, op2, op, constant)) {
     
    433433void JIT::emitSlow_op_bitxor(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    434434{
    435     unsigned dst = currentInstruction[1].u.operand;
    436     unsigned op1 = currentInstruction[2].u.operand;
    437     unsigned op2 = currentInstruction[3].u.operand;
     435    int dst = currentInstruction[1].u.operand;
     436    int op1 = currentInstruction[2].u.operand;
     437    int op2 = currentInstruction[3].u.operand;
    438438
    439439    if (!isOperandConstantImmediateInt(op1) && !isOperandConstantImmediateInt(op2))
     
    448448void JIT::emit_op_inc(Instruction* currentInstruction)
    449449{
    450     unsigned srcDst = currentInstruction[1].u.operand;
     450    int srcDst = currentInstruction[1].u.operand;
    451451
    452452    emitLoad(srcDst, regT1, regT0);
     
    459459void JIT::emitSlow_op_inc(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    460460{
    461     unsigned srcDst = currentInstruction[1].u.operand;
     461    int srcDst = currentInstruction[1].u.operand;
    462462
    463463    linkSlowCase(iter); // int32 check
     
    471471void JIT::emit_op_dec(Instruction* currentInstruction)
    472472{
    473     unsigned srcDst = currentInstruction[1].u.operand;
     473    int srcDst = currentInstruction[1].u.operand;
    474474
    475475    emitLoad(srcDst, regT1, regT0);
     
    482482void JIT::emitSlow_op_dec(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    483483{
    484     unsigned srcDst = currentInstruction[1].u.operand;
     484    int srcDst = currentInstruction[1].u.operand;
    485485
    486486    linkSlowCase(iter); // int32 check
     
    496496void JIT::emit_op_add(Instruction* currentInstruction)
    497497{
    498     unsigned dst = currentInstruction[1].u.operand;
    499     unsigned op1 = currentInstruction[2].u.operand;
    500     unsigned op2 = currentInstruction[3].u.operand;
     498    int dst = currentInstruction[1].u.operand;
     499    int op1 = currentInstruction[2].u.operand;
     500    int op2 = currentInstruction[3].u.operand;
    501501    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
    502502
     
    511511    JumpList notInt32Op2;
    512512
    513     unsigned op;
     513    int op;
    514514    int32_t constant;
    515515    if (getOperandConstantImmediateInt(op1, op2, op, constant)) {
     
    538538}
    539539
    540 void JIT::emitAdd32Constant(unsigned dst, unsigned op, int32_t constant, ResultType opType)
     540void JIT::emitAdd32Constant(int dst, int op, int32_t constant, ResultType opType)
    541541{
    542542    // Int32 case.
     
    567567void JIT::emitSlow_op_add(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    568568{
    569     unsigned dst = currentInstruction[1].u.operand;
    570     unsigned op1 = currentInstruction[2].u.operand;
    571     unsigned op2 = currentInstruction[3].u.operand;
     569    int dst = currentInstruction[1].u.operand;
     570    int op1 = currentInstruction[2].u.operand;
     571    int op2 = currentInstruction[3].u.operand;
    572572    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
    573573
     
    577577    }
    578578
    579     unsigned op;
     579    int op;
    580580    int32_t constant;
    581581    if (getOperandConstantImmediateInt(op1, op2, op, constant)) {
     
    615615void JIT::emit_op_sub(Instruction* currentInstruction)
    616616{
    617     unsigned dst = currentInstruction[1].u.operand;
    618     unsigned op1 = currentInstruction[2].u.operand;
    619     unsigned op2 = currentInstruction[3].u.operand;
     617    int dst = currentInstruction[1].u.operand;
     618    int op1 = currentInstruction[2].u.operand;
     619    int op2 = currentInstruction[3].u.operand;
    620620    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
    621621
     
    648648}
    649649
    650 void JIT::emitSub32Constant(unsigned dst, unsigned op, int32_t constant, ResultType opType)
     650void JIT::emitSub32Constant(int dst, int op, int32_t constant, ResultType opType)
    651651{
    652652    // Int32 case.
     
    682682void JIT::emitSlow_op_sub(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    683683{
    684     unsigned dst = currentInstruction[1].u.operand;
    685     unsigned op2 = currentInstruction[3].u.operand;
     684    int dst = currentInstruction[1].u.operand;
     685    int op2 = currentInstruction[3].u.operand;
    686686    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
    687687
     
    713713}
    714714
    715 void JIT::emitBinaryDoubleOp(OpcodeID opcodeID, unsigned dst, unsigned op1, unsigned op2, OperandTypes types, JumpList& notInt32Op1, JumpList& notInt32Op2, bool op1IsInRegisters, bool op2IsInRegisters)
     715void JIT::emitBinaryDoubleOp(OpcodeID opcodeID, int dst, int op1, int op2, OperandTypes types, JumpList& notInt32Op1, JumpList& notInt32Op2, bool op1IsInRegisters, bool op2IsInRegisters)
    716716{
    717717    JumpList end;
     
    941941void JIT::emit_op_mul(Instruction* currentInstruction)
    942942{
    943     unsigned dst = currentInstruction[1].u.operand;
    944     unsigned op1 = currentInstruction[2].u.operand;
    945     unsigned op2 = currentInstruction[3].u.operand;
     943    int dst = currentInstruction[1].u.operand;
     944    int op1 = currentInstruction[2].u.operand;
     945    int op2 = currentInstruction[3].u.operand;
    946946    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
    947947
     
    977977void JIT::emitSlow_op_mul(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    978978{
    979     unsigned dst = currentInstruction[1].u.operand;
    980     unsigned op1 = currentInstruction[2].u.operand;
    981     unsigned op2 = currentInstruction[3].u.operand;
     979    int dst = currentInstruction[1].u.operand;
     980    int op1 = currentInstruction[2].u.operand;
     981    int op2 = currentInstruction[3].u.operand;
    982982    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
    983983
     
    10231023void JIT::emit_op_div(Instruction* currentInstruction)
    10241024{
    1025     unsigned dst = currentInstruction[1].u.operand;
    1026     unsigned op1 = currentInstruction[2].u.operand;
    1027     unsigned op2 = currentInstruction[3].u.operand;
     1025    int dst = currentInstruction[1].u.operand;
     1026    int op1 = currentInstruction[2].u.operand;
     1027    int op2 = currentInstruction[3].u.operand;
    10281028    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
    10291029
     
    10861086void JIT::emitSlow_op_div(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    10871087{
    1088     unsigned dst = currentInstruction[1].u.operand;
     1088    int dst = currentInstruction[1].u.operand;
    10891089
    10901090    OperandTypes types = OperandTypes::fromInt(currentInstruction[4].u.operand);
     
    11141114{
    11151115#if CPU(X86) || CPU(X86_64)
    1116     unsigned dst = currentInstruction[1].u.operand;
    1117     unsigned op1 = currentInstruction[2].u.operand;
    1118     unsigned op2 = currentInstruction[3].u.operand;
     1116    int dst = currentInstruction[1].u.operand;
     1117    int op1 = currentInstruction[2].u.operand;
     1118    int op2 = currentInstruction[3].u.operand;
    11191119
    11201120    // Make sure registers are correct for x86 IDIV instructions.
  • trunk/Source/JavaScriptCore/jit/JITInlines.h

    r155415 r155418  
    3434namespace JSC {
    3535
    36 ALWAYS_INLINE bool JIT::isOperandConstantImmediateDouble(unsigned src)
     36ALWAYS_INLINE bool JIT::isOperandConstantImmediateDouble(int src)
    3737{
    3838    return m_codeBlock->isConstantRegisterIndex(src) && getConstantOperand(src).isDouble();
    3939}
    4040
    41 ALWAYS_INLINE JSValue JIT::getConstantOperand(unsigned src)
     41ALWAYS_INLINE JSValue JIT::getConstantOperand(int src)
    4242{
    4343    ASSERT(m_codeBlock->isConstantRegisterIndex(src));
     
    313313#endif
    314314
    315 ALWAYS_INLINE bool JIT::isOperandConstantImmediateChar(unsigned src)
     315ALWAYS_INLINE bool JIT::isOperandConstantImmediateChar(int src)
    316316{
    317317    return m_codeBlock->isConstantRegisterIndex(src) && getConstantOperand(src).isString() && asString(getConstantOperand(src).asCell())->length() == 1;
     
    606606}
    607607
    608 ALWAYS_INLINE void JIT::emitInitRegister(unsigned dst)
     608ALWAYS_INLINE void JIT::emitInitRegister(int dst)
    609609{
    610610    emitStore(dst, jsUndefined());
     
    706706}
    707707
    708 ALWAYS_INLINE bool JIT::isOperandConstantImmediateInt(unsigned src)
     708ALWAYS_INLINE bool JIT::isOperandConstantImmediateInt(int src)
    709709{
    710710    return m_codeBlock->isConstantRegisterIndex(src) && getConstantOperand(src).isInt32();
    711711}
    712712
    713 ALWAYS_INLINE bool JIT::getOperandConstantImmediateInt(unsigned op1, unsigned op2, unsigned& op, int32_t& constant)
     713ALWAYS_INLINE bool JIT::getOperandConstantImmediateInt(int op1, int op2, int& op, int32_t& constant)
    714714{
    715715    if (isOperandConstantImmediateInt(op1)) {
     
    732732/* Deprecated: Please use JITStubCall instead. */
    733733
    734 ALWAYS_INLINE void JIT::emitGetJITStubArg(unsigned argumentNumber, RegisterID dst)
    735 {
    736     unsigned argumentStackOffset = (argumentNumber * (sizeof(JSValue) / sizeof(void*))) + JITSTACKFRAME_ARGS_INDEX;
     734ALWAYS_INLINE void JIT::emitGetJITStubArg(int argumentNumber, RegisterID dst)
     735{
     736    int argumentStackOffset = (argumentNumber * (sizeof(JSValue) / sizeof(void*))) + JITSTACKFRAME_ARGS_INDEX;
    737737    peek64(dst, argumentStackOffset);
    738738}
     
    782782}
    783783
    784 ALWAYS_INLINE int32_t JIT::getConstantOperandImmediateInt(unsigned src)
     784ALWAYS_INLINE int32_t JIT::getConstantOperandImmediateInt(int src)
    785785{
    786786    return getConstantOperand(src).asInt32();
    787787}
    788788
    789 ALWAYS_INLINE bool JIT::isOperandConstantImmediateInt(unsigned src)
     789ALWAYS_INLINE bool JIT::isOperandConstantImmediateInt(int src)
    790790{
    791791    return m_codeBlock->isConstantRegisterIndex(src) && getConstantOperand(src).isInt32();
    792792}
    793793
    794 ALWAYS_INLINE void JIT::emitPutVirtualRegister(unsigned dst, RegisterID from)
     794ALWAYS_INLINE void JIT::emitPutVirtualRegister(int dst, RegisterID from)
    795795{
    796796    store64(from, Address(callFrameRegister, dst * sizeof(Register)));
    797     m_lastResultBytecodeRegister = (from == cachedResultRegister) ? static_cast<int>(dst) : std::numeric_limits<int>::max();
    798 }
    799 
    800 ALWAYS_INLINE void JIT::emitInitRegister(unsigned dst)
     797    m_lastResultBytecodeRegister = (from == cachedResultRegister) ? dst : std::numeric_limits<int>::max();
     798}
     799
     800ALWAYS_INLINE void JIT::emitInitRegister(int dst)
    801801{
    802802    store64(TrustedImm64(JSValue::encode(jsUndefined())), Address(callFrameRegister, dst * sizeof(Register)));
  • trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp

    r155415 r155418  
    120120void JIT::emit_op_check_has_instance(Instruction* currentInstruction)
    121121{
    122     unsigned baseVal = currentInstruction[3].u.operand;
     122    int baseVal = currentInstruction[3].u.operand;
    123123
    124124    emitGetVirtualRegister(baseVal, regT0);
     
    134134void JIT::emit_op_instanceof(Instruction* currentInstruction)
    135135{
    136     unsigned dst = currentInstruction[1].u.operand;
    137     unsigned value = currentInstruction[2].u.operand;
    138     unsigned proto = currentInstruction[3].u.operand;
     136    int dst = currentInstruction[1].u.operand;
     137    int value = currentInstruction[2].u.operand;
     138    int proto = currentInstruction[3].u.operand;
    139139
    140140    // Load the operands (baseVal, proto, and value respectively) into registers.
     
    174174void JIT::emit_op_is_undefined(Instruction* currentInstruction)
    175175{
    176     unsigned dst = currentInstruction[1].u.operand;
    177     unsigned value = currentInstruction[2].u.operand;
     176    int dst = currentInstruction[1].u.operand;
     177    int value = currentInstruction[2].u.operand;
    178178   
    179179    emitGetVirtualRegister(value, regT0);
     
    202202void JIT::emit_op_is_boolean(Instruction* currentInstruction)
    203203{
    204     unsigned dst = currentInstruction[1].u.operand;
    205     unsigned value = currentInstruction[2].u.operand;
     204    int dst = currentInstruction[1].u.operand;
     205    int value = currentInstruction[2].u.operand;
    206206   
    207207    emitGetVirtualRegister(value, regT0);
     
    214214void JIT::emit_op_is_number(Instruction* currentInstruction)
    215215{
    216     unsigned dst = currentInstruction[1].u.operand;
    217     unsigned value = currentInstruction[2].u.operand;
     216    int dst = currentInstruction[1].u.operand;
     217    int value = currentInstruction[2].u.operand;
    218218   
    219219    emitGetVirtualRegister(value, regT0);
     
    225225void JIT::emit_op_is_string(Instruction* currentInstruction)
    226226{
    227     unsigned dst = currentInstruction[1].u.operand;
    228     unsigned value = currentInstruction[2].u.operand;
     227    int dst = currentInstruction[1].u.operand;
     228    int value = currentInstruction[2].u.operand;
    229229   
    230230    emitGetVirtualRegister(value, regT0);
     
    377377void JIT::emit_op_jeq_null(Instruction* currentInstruction)
    378378{
    379     unsigned src = currentInstruction[1].u.operand;
     379    int src = currentInstruction[1].u.operand;
    380380    unsigned target = currentInstruction[2].u.operand;
    381381
     
    400400void JIT::emit_op_jneq_null(Instruction* currentInstruction)
    401401{
    402     unsigned src = currentInstruction[1].u.operand;
     402    int src = currentInstruction[1].u.operand;
    403403    unsigned target = currentInstruction[2].u.operand;
    404404
     
    423423void JIT::emit_op_jneq_ptr(Instruction* currentInstruction)
    424424{
    425     unsigned src = currentInstruction[1].u.operand;
     425    int src = currentInstruction[1].u.operand;
    426426    Special::Pointer ptr = currentInstruction[2].u.specialPointer;
    427427    unsigned target = currentInstruction[3].u.operand;
     
    618618void JIT::compileOpStrictEq(Instruction* currentInstruction, CompileOpStrictEqType type)
    619619{
    620     unsigned dst = currentInstruction[1].u.operand;
    621     unsigned src1 = currentInstruction[2].u.operand;
    622     unsigned src2 = currentInstruction[3].u.operand;
     620    int dst = currentInstruction[1].u.operand;
     621    int src1 = currentInstruction[2].u.operand;
     622    int src2 = currentInstruction[3].u.operand;
    623623
    624624    emitGetVirtualRegisters(src1, regT0, src2, regT1);
     
    767767void JIT::emit_op_eq_null(Instruction* currentInstruction)
    768768{
    769     unsigned dst = currentInstruction[1].u.operand;
    770     unsigned src1 = currentInstruction[2].u.operand;
     769    int dst = currentInstruction[1].u.operand;
     770    int src1 = currentInstruction[2].u.operand;
    771771
    772772    emitGetVirtualRegister(src1, regT0);
     
    799799void JIT::emit_op_neq_null(Instruction* currentInstruction)
    800800{
    801     unsigned dst = currentInstruction[1].u.operand;
    802     unsigned src1 = currentInstruction[2].u.operand;
     801    int dst = currentInstruction[1].u.operand;
     802    int src1 = currentInstruction[2].u.operand;
    803803
    804804    emitGetVirtualRegister(src1, regT0);
     
    842842void JIT::emit_op_create_activation(Instruction* currentInstruction)
    843843{
    844     unsigned dst = currentInstruction[1].u.operand;
     844    int dst = currentInstruction[1].u.operand;
    845845   
    846846    Jump activationCreated = branchTest64(NonZero, Address(callFrameRegister, sizeof(Register) * dst));
     
    852852void JIT::emit_op_create_arguments(Instruction* currentInstruction)
    853853{
    854     unsigned dst = currentInstruction[1].u.operand;
     854    int dst = currentInstruction[1].u.operand;
    855855
    856856    Jump argsCreated = branchTest64(NonZero, Address(callFrameRegister, sizeof(Register) * dst));
     
    863863void JIT::emit_op_init_lazy_reg(Instruction* currentInstruction)
    864864{
    865     unsigned dst = currentInstruction[1].u.operand;
     865    int dst = currentInstruction[1].u.operand;
    866866
    867867    store64(TrustedImm64((int64_t)0), Address(callFrameRegister, sizeof(Register) * dst));
     
    882882void JIT::emit_op_get_callee(Instruction* currentInstruction)
    883883{
    884     unsigned result = currentInstruction[1].u.operand;
     884    int result = currentInstruction[1].u.operand;
    885885    emitGetFromCallFrameHeaderPtr(JSStack::Callee, regT0);
    886886    emitValueProfilingSite(regT4);
     
    10401040void JIT::emitSlow_op_check_has_instance(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    10411041{
    1042     unsigned dst = currentInstruction[1].u.operand;
    1043     unsigned value = currentInstruction[2].u.operand;
    1044     unsigned baseVal = currentInstruction[3].u.operand;
     1042    int dst = currentInstruction[1].u.operand;
     1043    int value = currentInstruction[2].u.operand;
     1044    int baseVal = currentInstruction[3].u.operand;
    10451045
    10461046    linkSlowCaseIfNotJSCell(iter, baseVal);
     
    10561056void JIT::emitSlow_op_instanceof(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    10571057{
    1058     unsigned dst = currentInstruction[1].u.operand;
    1059     unsigned value = currentInstruction[2].u.operand;
    1060     unsigned proto = currentInstruction[3].u.operand;
     1058    int dst = currentInstruction[1].u.operand;
     1059    int value = currentInstruction[2].u.operand;
     1060    int proto = currentInstruction[3].u.operand;
    10611061
    10621062    linkSlowCaseIfNotJSCell(iter, value);
     
    10921092{
    10931093    linkSlowCase(iter);
    1094     unsigned dst = currentInstruction[1].u.operand;
    1095     unsigned base = currentInstruction[2].u.operand;
     1094    int dst = currentInstruction[1].u.operand;
     1095    int base = currentInstruction[2].u.operand;
    10961096    const Identifier* ident = &(m_codeBlock->identifier(currentInstruction[3].u.operand));
    10971097   
     
    11251125void JIT::emitSlow_op_get_argument_by_val(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    11261126{
    1127     unsigned dst = currentInstruction[1].u.operand;
    1128     unsigned arguments = currentInstruction[2].u.operand;
    1129     unsigned property = currentInstruction[3].u.operand;
     1127    int dst = currentInstruction[1].u.operand;
     1128    int arguments = currentInstruction[2].u.operand;
     1129    int property = currentInstruction[3].u.operand;
    11301130   
    11311131    linkSlowCase(iter);
  • trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp

    r155415 r155418  
    183183void JIT::emit_op_mov(Instruction* currentInstruction)
    184184{
    185     unsigned dst = currentInstruction[1].u.operand;
    186     unsigned src = currentInstruction[2].u.operand;
     185    int dst = currentInstruction[1].u.operand;
     186    int src = currentInstruction[2].u.operand;
    187187
    188188    if (m_codeBlock->isConstantRegisterIndex(src))
     
    234234void JIT::emit_op_check_has_instance(Instruction* currentInstruction)
    235235{
    236     unsigned baseVal = currentInstruction[3].u.operand;
     236    int baseVal = currentInstruction[3].u.operand;
    237237
    238238    emitLoadPayload(baseVal, regT0);
     
    248248void JIT::emit_op_instanceof(Instruction* currentInstruction)
    249249{
    250     unsigned dst = currentInstruction[1].u.operand;
    251     unsigned value = currentInstruction[2].u.operand;
    252     unsigned proto = currentInstruction[3].u.operand;
     250    int dst = currentInstruction[1].u.operand;
     251    int value = currentInstruction[2].u.operand;
     252    int proto = currentInstruction[3].u.operand;
    253253
    254254    // Load the operands into registers.
     
    288288void JIT::emitSlow_op_check_has_instance(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    289289{
    290     unsigned dst = currentInstruction[1].u.operand;
    291     unsigned value = currentInstruction[2].u.operand;
    292     unsigned baseVal = currentInstruction[3].u.operand;
     290    int dst = currentInstruction[1].u.operand;
     291    int value = currentInstruction[2].u.operand;
     292    int baseVal = currentInstruction[3].u.operand;
    293293
    294294    linkSlowCaseIfNotJSCell(iter, baseVal);
     
    305305void JIT::emitSlow_op_instanceof(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    306306{
    307     unsigned dst = currentInstruction[1].u.operand;
    308     unsigned value = currentInstruction[2].u.operand;
    309     unsigned proto = currentInstruction[3].u.operand;
     307    int dst = currentInstruction[1].u.operand;
     308    int value = currentInstruction[2].u.operand;
     309    int proto = currentInstruction[3].u.operand;
    310310
    311311    linkSlowCaseIfNotJSCell(iter, value);
     
    321321void JIT::emit_op_is_undefined(Instruction* currentInstruction)
    322322{
    323     unsigned dst = currentInstruction[1].u.operand;
    324     unsigned value = currentInstruction[2].u.operand;
     323    int dst = currentInstruction[1].u.operand;
     324    int value = currentInstruction[2].u.operand;
    325325   
    326326    emitLoad(value, regT1, regT0);
     
    348348void JIT::emit_op_is_boolean(Instruction* currentInstruction)
    349349{
    350     unsigned dst = currentInstruction[1].u.operand;
    351     unsigned value = currentInstruction[2].u.operand;
     350    int dst = currentInstruction[1].u.operand;
     351    int value = currentInstruction[2].u.operand;
    352352   
    353353    emitLoadTag(value, regT0);
     
    358358void JIT::emit_op_is_number(Instruction* currentInstruction)
    359359{
    360     unsigned dst = currentInstruction[1].u.operand;
    361     unsigned value = currentInstruction[2].u.operand;
     360    int dst = currentInstruction[1].u.operand;
     361    int value = currentInstruction[2].u.operand;
    362362   
    363363    emitLoadTag(value, regT0);
     
    369369void JIT::emit_op_is_string(Instruction* currentInstruction)
    370370{
    371     unsigned dst = currentInstruction[1].u.operand;
    372     unsigned value = currentInstruction[2].u.operand;
     371    int dst = currentInstruction[1].u.operand;
     372    int value = currentInstruction[2].u.operand;
    373373   
    374374    emitLoad(value, regT1, regT0);
     
    388388void JIT::emit_op_tear_off_activation(Instruction* currentInstruction)
    389389{
    390     unsigned activation = currentInstruction[1].u.operand;
     390    int activation = currentInstruction[1].u.operand;
    391391    Jump activationNotCreated = branch32(Equal, tagFor(activation), TrustedImm32(JSValue::EmptyValueTag));
    392392    JITStubCall stubCall(this, cti_op_tear_off_activation);
     
    444444void JIT::emit_op_not(Instruction* currentInstruction)
    445445{
    446     unsigned dst = currentInstruction[1].u.operand;
    447     unsigned src = currentInstruction[2].u.operand;
     446    int dst = currentInstruction[1].u.operand;
     447    int src = currentInstruction[2].u.operand;
    448448
    449449    emitLoadTag(src, regT0);
     
    458458void JIT::emitSlow_op_not(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    459459{
    460     unsigned dst = currentInstruction[1].u.operand;
     460    int dst = currentInstruction[1].u.operand;
    461461
    462462    linkSlowCase(iter);
     
    469469void JIT::emit_op_jfalse(Instruction* currentInstruction)
    470470{
    471     unsigned cond = currentInstruction[1].u.operand;
     471    int cond = currentInstruction[1].u.operand;
    472472    unsigned target = currentInstruction[2].u.operand;
    473473
     
    481481void JIT::emitSlow_op_jfalse(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    482482{
    483     unsigned cond = currentInstruction[1].u.operand;
     483    int cond = currentInstruction[1].u.operand;
    484484    unsigned target = currentInstruction[2].u.operand;
    485485
     
    505505void JIT::emit_op_jtrue(Instruction* currentInstruction)
    506506{
    507     unsigned cond = currentInstruction[1].u.operand;
     507    int cond = currentInstruction[1].u.operand;
    508508    unsigned target = currentInstruction[2].u.operand;
    509509
     
    517517void JIT::emitSlow_op_jtrue(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    518518{
    519     unsigned cond = currentInstruction[1].u.operand;
     519    int cond = currentInstruction[1].u.operand;
    520520    unsigned target = currentInstruction[2].u.operand;
    521521
     
    541541void JIT::emit_op_jeq_null(Instruction* currentInstruction)
    542542{
    543     unsigned src = currentInstruction[1].u.operand;
     543    int src = currentInstruction[1].u.operand;
    544544    unsigned target = currentInstruction[2].u.operand;
    545545
     
    567567void JIT::emit_op_jneq_null(Instruction* currentInstruction)
    568568{
    569     unsigned src = currentInstruction[1].u.operand;
     569    int src = currentInstruction[1].u.operand;
    570570    unsigned target = currentInstruction[2].u.operand;
    571571
     
    593593void JIT::emit_op_jneq_ptr(Instruction* currentInstruction)
    594594{
    595     unsigned src = currentInstruction[1].u.operand;
     595    int src = currentInstruction[1].u.operand;
    596596    Special::Pointer ptr = currentInstruction[2].u.specialPointer;
    597597    unsigned target = currentInstruction[3].u.operand;
     
    604604void JIT::emit_op_eq(Instruction* currentInstruction)
    605605{
    606     unsigned dst = currentInstruction[1].u.operand;
    607     unsigned src1 = currentInstruction[2].u.operand;
    608     unsigned src2 = currentInstruction[3].u.operand;
     606    int dst = currentInstruction[1].u.operand;
     607    int src1 = currentInstruction[2].u.operand;
     608    int src2 = currentInstruction[3].u.operand;
    609609
    610610    emitLoad2(src1, regT1, regT0, src2, regT3, regT2);
     
    620620void JIT::emitSlow_op_eq(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    621621{
    622     unsigned dst = currentInstruction[1].u.operand;
    623     unsigned op1 = currentInstruction[2].u.operand;
    624     unsigned op2 = currentInstruction[3].u.operand;
     622    int dst = currentInstruction[1].u.operand;
     623    int op1 = currentInstruction[2].u.operand;
     624    int op2 = currentInstruction[3].u.operand;
    625625
    626626    JumpList storeResult;
     
    654654void JIT::emit_op_neq(Instruction* currentInstruction)
    655655{
    656     unsigned dst = currentInstruction[1].u.operand;
    657     unsigned src1 = currentInstruction[2].u.operand;
    658     unsigned src2 = currentInstruction[3].u.operand;
     656    int dst = currentInstruction[1].u.operand;
     657    int src1 = currentInstruction[2].u.operand;
     658    int src2 = currentInstruction[3].u.operand;
    659659
    660660    emitLoad2(src1, regT1, regT0, src2, regT3, regT2);
     
    670670void JIT::emitSlow_op_neq(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    671671{
    672     unsigned dst = currentInstruction[1].u.operand;
     672    int dst = currentInstruction[1].u.operand;
    673673
    674674    JumpList storeResult;
     
    703703void JIT::compileOpStrictEq(Instruction* currentInstruction, CompileOpStrictEqType type)
    704704{
    705     unsigned dst = currentInstruction[1].u.operand;
    706     unsigned src1 = currentInstruction[2].u.operand;
    707     unsigned src2 = currentInstruction[3].u.operand;
     705    int dst = currentInstruction[1].u.operand;
     706    int src1 = currentInstruction[2].u.operand;
     707    int src2 = currentInstruction[3].u.operand;
    708708
    709709    emitLoad2(src1, regT1, regT0, src2, regT3, regT2);
     
    736736void JIT::emitSlow_op_stricteq(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    737737{
    738     unsigned dst = currentInstruction[1].u.operand;
     738    int dst = currentInstruction[1].u.operand;
    739739
    740740    linkSlowCase(iter);
     
    754754void JIT::emitSlow_op_nstricteq(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    755755{
    756     unsigned dst = currentInstruction[1].u.operand;
     756    int dst = currentInstruction[1].u.operand;
    757757
    758758    linkSlowCase(iter);
     
    767767void JIT::emit_op_eq_null(Instruction* currentInstruction)
    768768{
    769     unsigned dst = currentInstruction[1].u.operand;
    770     unsigned src = currentInstruction[2].u.operand;
     769    int dst = currentInstruction[1].u.operand;
     770    int src = currentInstruction[2].u.operand;
    771771
    772772    emitLoad(src, regT1, regT0);
     
    798798void JIT::emit_op_neq_null(Instruction* currentInstruction)
    799799{
    800     unsigned dst = currentInstruction[1].u.operand;
    801     unsigned src = currentInstruction[2].u.operand;
     800    int dst = currentInstruction[1].u.operand;
     801    int src = currentInstruction[2].u.operand;
    802802
    803803    emitLoad(src, regT1, regT0);
     
    11051105void JIT::emit_op_create_activation(Instruction* currentInstruction)
    11061106{
    1107     unsigned activation = currentInstruction[1].u.operand;
     1107    int activation = currentInstruction[1].u.operand;
    11081108   
    11091109    Jump activationCreated = branch32(NotEqual, tagFor(activation), TrustedImm32(JSValue::EmptyValueTag));
     
    11141114void JIT::emit_op_create_arguments(Instruction* currentInstruction)
    11151115{
    1116     unsigned dst = currentInstruction[1].u.operand;
     1116    int dst = currentInstruction[1].u.operand;
    11171117
    11181118    Jump argsCreated = branch32(NotEqual, tagFor(dst), TrustedImm32(JSValue::EmptyValueTag));
     
    11261126void JIT::emit_op_init_lazy_reg(Instruction* currentInstruction)
    11271127{
    1128     unsigned dst = currentInstruction[1].u.operand;
     1128    int dst = currentInstruction[1].u.operand;
    11291129
    11301130    emitStore(dst, JSValue());
     
    11711171void JIT::emit_op_to_this(Instruction* currentInstruction)
    11721172{
    1173     unsigned thisRegister = currentInstruction[1].u.operand;
     1173    int thisRegister = currentInstruction[1].u.operand;
    11741174
    11751175    emitLoad(thisRegister, regT3, regT2);
     
    12531253void JIT::emitSlow_op_get_argument_by_val(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    12541254{
    1255     unsigned dst = currentInstruction[1].u.operand;
    1256     unsigned arguments = currentInstruction[2].u.operand;
    1257     unsigned property = currentInstruction[3].u.operand;
     1255    int dst = currentInstruction[1].u.operand;
     1256    int arguments = currentInstruction[2].u.operand;
     1257    int property = currentInstruction[3].u.operand;
    12581258
    12591259    linkSlowCase(iter);
  • trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp

    r154127 r155418  
    9696void JIT::emit_op_get_by_val(Instruction* currentInstruction)
    9797{
    98     unsigned dst = currentInstruction[1].u.operand;
    99     unsigned base = currentInstruction[2].u.operand;
    100     unsigned property = currentInstruction[3].u.operand;
     98    int dst = currentInstruction[1].u.operand;
     99    int base = currentInstruction[2].u.operand;
     100    int property = currentInstruction[3].u.operand;
    101101    ArrayProfile* profile = currentInstruction[4].u.arrayProfile;
    102102   
     
    202202void JIT::emitSlow_op_get_by_val(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    203203{
    204     unsigned dst = currentInstruction[1].u.operand;
    205     unsigned base = currentInstruction[2].u.operand;
    206     unsigned property = currentInstruction[3].u.operand;
     204    int dst = currentInstruction[1].u.operand;
     205    int base = currentInstruction[2].u.operand;
     206    int property = currentInstruction[3].u.operand;
    207207    ArrayProfile* profile = currentInstruction[4].u.arrayProfile;
    208208   
     
    270270void JIT::emit_op_get_by_pname(Instruction* currentInstruction)
    271271{
    272     unsigned dst = currentInstruction[1].u.operand;
    273     unsigned base = currentInstruction[2].u.operand;
    274     unsigned property = currentInstruction[3].u.operand;
     272    int dst = currentInstruction[1].u.operand;
     273    int base = currentInstruction[2].u.operand;
     274    int property = currentInstruction[3].u.operand;
    275275    unsigned expected = currentInstruction[4].u.operand;
    276     unsigned iter = currentInstruction[5].u.operand;
    277     unsigned i = currentInstruction[6].u.operand;
     276    int iter = currentInstruction[5].u.operand;
     277    int i = currentInstruction[6].u.operand;
    278278
    279279    emitGetVirtualRegister(property, regT0);
     
    299299void JIT::emitSlow_op_get_by_pname(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    300300{
    301     unsigned dst = currentInstruction[1].u.operand;
    302     unsigned base = currentInstruction[2].u.operand;
    303     unsigned property = currentInstruction[3].u.operand;
     301    int dst = currentInstruction[1].u.operand;
     302    int base = currentInstruction[2].u.operand;
     303    int property = currentInstruction[3].u.operand;
    304304
    305305    linkSlowCase(iter);
     
    316316void JIT::emit_op_put_by_val(Instruction* currentInstruction)
    317317{
    318     unsigned base = currentInstruction[1].u.operand;
    319     unsigned property = currentInstruction[2].u.operand;
     318    int base = currentInstruction[1].u.operand;
     319    int property = currentInstruction[2].u.operand;
    320320    ArrayProfile* profile = currentInstruction[4].u.arrayProfile;
    321321
     
    363363JIT::JumpList JIT::emitGenericContiguousPutByVal(Instruction* currentInstruction, PatchableJump& badType, IndexingType indexingShape)
    364364{
    365     unsigned value = currentInstruction[3].u.operand;
     365    int value = currentInstruction[3].u.operand;
    366366    ArrayProfile* profile = currentInstruction[4].u.arrayProfile;
    367367   
     
    418418JIT::JumpList JIT::emitArrayStoragePutByVal(Instruction* currentInstruction, PatchableJump& badType)
    419419{
    420     unsigned value = currentInstruction[3].u.operand;
     420    int value = currentInstruction[3].u.operand;
    421421    ArrayProfile* profile = currentInstruction[4].u.arrayProfile;
    422422   
     
    451451void JIT::emitSlow_op_put_by_val(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    452452{
    453     unsigned base = currentInstruction[1].u.operand;
    454     unsigned property = currentInstruction[2].u.operand;
    455     unsigned value = currentInstruction[3].u.operand;
     453    int base = currentInstruction[1].u.operand;
     454    int property = currentInstruction[2].u.operand;
     455    int value = currentInstruction[3].u.operand;
    456456    ArrayProfile* profile = currentInstruction[4].u.arrayProfile;
    457457
     
    517517void JIT::emit_op_get_by_id(Instruction* currentInstruction)
    518518{
    519     unsigned resultVReg = currentInstruction[1].u.operand;
    520     unsigned baseVReg = currentInstruction[2].u.operand;
     519    int resultVReg = currentInstruction[1].u.operand;
     520    int baseVReg = currentInstruction[2].u.operand;
    521521    const Identifier* ident = &(m_codeBlock->identifier(currentInstruction[3].u.operand));
    522522
     
    561561void JIT::emitSlow_op_get_by_id(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    562562{
    563     unsigned resultVReg = currentInstruction[1].u.operand;
    564     unsigned baseVReg = currentInstruction[2].u.operand;
     563    int resultVReg = currentInstruction[1].u.operand;
     564    int baseVReg = currentInstruction[2].u.operand;
    565565    const Identifier* ident = &(m_codeBlock->identifier(currentInstruction[3].u.operand));
    566566
     
    596596void JIT::emit_op_put_by_id(Instruction* currentInstruction)
    597597{
    598     unsigned baseVReg = currentInstruction[1].u.operand;
    599     unsigned valueVReg = currentInstruction[3].u.operand;
     598    int baseVReg = currentInstruction[1].u.operand;
     599    int valueVReg = currentInstruction[3].u.operand;
    600600
    601601    // In order to be able to patch both the Structure, and the object offset, we store one pointer,
     
    628628void JIT::emitSlow_op_put_by_id(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    629629{
    630     unsigned baseVReg = currentInstruction[1].u.operand;
     630    int baseVReg = currentInstruction[1].u.operand;
    631631    const Identifier* ident = &(m_codeBlock->identifier(currentInstruction[2].u.operand));
    632632    unsigned direct = currentInstruction[8].u.operand;
     
    12121212}
    12131213
    1214 void JIT::emitResolveClosure(unsigned dst, bool needsVarInjectionChecks, unsigned depth)
     1214void JIT::emitResolveClosure(int dst, bool needsVarInjectionChecks, unsigned depth)
    12151215{
    12161216    emitVarInjectionCheck(needsVarInjectionChecks);
     
    12291229void JIT::emit_op_resolve_scope(Instruction* currentInstruction)
    12301230{
    1231     unsigned dst = currentInstruction[1].u.operand;
     1231    int dst = currentInstruction[1].u.operand;
    12321232    ResolveType resolveType = static_cast<ResolveType>(currentInstruction[3].u.operand);
    12331233    unsigned depth = currentInstruction[4].u.operand;
     
    12551255void JIT::emitSlow_op_resolve_scope(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    12561256{
    1257     unsigned dst = currentInstruction[1].u.operand;
     1257    int dst = currentInstruction[1].u.operand;
    12581258    ResolveType resolveType = static_cast<ResolveType>(currentInstruction[3].u.operand);
    12591259
     
    12681268}
    12691269
    1270 void JIT::emitLoadWithStructureCheck(unsigned scope, Structure** structureSlot)
     1270void JIT::emitLoadWithStructureCheck(int scope, Structure** structureSlot)
    12711271{
    12721272    emitGetVirtualRegister(scope, regT0);
     
    12861286}
    12871287
    1288 void JIT::emitGetClosureVar(unsigned scope, uintptr_t operand)
     1288void JIT::emitGetClosureVar(int scope, uintptr_t operand)
    12891289{
    12901290    emitGetVirtualRegister(scope, regT0);
     
    12951295void JIT::emit_op_get_from_scope(Instruction* currentInstruction)
    12961296{
    1297     unsigned dst = currentInstruction[1].u.operand;
    1298     unsigned scope = currentInstruction[2].u.operand;
     1297    int dst = currentInstruction[1].u.operand;
     1298    int scope = currentInstruction[2].u.operand;
    12991299    ResolveType resolveType = ResolveModeAndType(currentInstruction[4].u.operand).type();
    13001300    Structure** structureSlot = currentInstruction[5].u.structure.slot();
     
    13281328void JIT::emitSlow_op_get_from_scope(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    13291329{
    1330     unsigned dst = currentInstruction[1].u.operand;
     1330    int dst = currentInstruction[1].u.operand;
    13311331    ResolveType resolveType = ResolveModeAndType(currentInstruction[4].u.operand).type();
    13321332
     
    13421342}
    13431343
    1344 void JIT::emitPutGlobalProperty(uintptr_t* operandSlot, unsigned value)
     1344void JIT::emitPutGlobalProperty(uintptr_t* operandSlot, int value)
    13451345{
    13461346    loadPtr(Address(regT0, JSObject::butterflyOffset()), regT0);
     
    13511351}
    13521352
    1353 void JIT::emitPutGlobalVar(uintptr_t operand, unsigned value)
     1353void JIT::emitPutGlobalVar(uintptr_t operand, int value)
    13541354{
    13551355    emitGetVirtualRegister(value, regT0);
     
    13571357}
    13581358
    1359 void JIT::emitPutClosureVar(unsigned scope, uintptr_t operand, unsigned value)
     1359void JIT::emitPutClosureVar(int scope, uintptr_t operand, int value)
    13601360{
    13611361    emitGetVirtualRegister(value, regT1);
     
    13671367void JIT::emit_op_put_to_scope(Instruction* currentInstruction)
    13681368{
    1369     unsigned scope = currentInstruction[1].u.operand;
    1370     unsigned value = currentInstruction[3].u.operand;
     1369    int scope = currentInstruction[1].u.operand;
     1370    int value = currentInstruction[3].u.operand;
    13711371    ResolveType resolveType = ResolveModeAndType(currentInstruction[4].u.operand).type();
    13721372    Structure** structureSlot = currentInstruction[5].u.structure.slot();
     
    17531753    ASSERT(isInt(type));
    17541754   
    1755     unsigned value = currentInstruction[3].u.operand;
     1755    int value = currentInstruction[3].u.operand;
    17561756
    17571757#if USE(JSVALUE64)
     
    18191819    ASSERT(isFloat(type));
    18201820   
    1821     unsigned value = currentInstruction[3].u.operand;
     1821    int value = currentInstruction[3].u.operand;
    18221822
    18231823#if USE(JSVALUE64)
  • trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp

    r153962 r155418  
    5555void JIT::emit_op_put_by_index(Instruction* currentInstruction)
    5656{
    57     unsigned base = currentInstruction[1].u.operand;
    58     unsigned property = currentInstruction[2].u.operand;
    59     unsigned value = currentInstruction[3].u.operand;
     57    int base = currentInstruction[1].u.operand;
     58    int property = currentInstruction[2].u.operand;
     59    int value = currentInstruction[3].u.operand;
    6060   
    6161    JITStubCall stubCall(this, cti_op_put_by_index);
     
    6868void JIT::emit_op_put_getter_setter(Instruction* currentInstruction)
    6969{
    70     unsigned base = currentInstruction[1].u.operand;
    71     unsigned property = currentInstruction[2].u.operand;
    72     unsigned getter = currentInstruction[3].u.operand;
    73     unsigned setter = currentInstruction[4].u.operand;
     70    int base = currentInstruction[1].u.operand;
     71    int property = currentInstruction[2].u.operand;
     72    int getter = currentInstruction[3].u.operand;
     73    int setter = currentInstruction[4].u.operand;
    7474   
    7575    JITStubCall stubCall(this, cti_op_put_getter_setter);
     
    8383void JIT::emit_op_del_by_id(Instruction* currentInstruction)
    8484{
    85     unsigned dst = currentInstruction[1].u.operand;
    86     unsigned base = currentInstruction[2].u.operand;
    87     unsigned property = currentInstruction[3].u.operand;
     85    int dst = currentInstruction[1].u.operand;
     86    int base = currentInstruction[2].u.operand;
     87    int property = currentInstruction[3].u.operand;
    8888   
    8989    JITStubCall stubCall(this, cti_op_del_by_id);
     
    137137void JIT::emit_op_get_by_val(Instruction* currentInstruction)
    138138{
    139     unsigned dst = currentInstruction[1].u.operand;
    140     unsigned base = currentInstruction[2].u.operand;
    141     unsigned property = currentInstruction[3].u.operand;
     139    int dst = currentInstruction[1].u.operand;
     140    int base = currentInstruction[2].u.operand;
     141    int property = currentInstruction[3].u.operand;
    142142    ArrayProfile* profile = currentInstruction[4].u.arrayProfile;
    143143   
     
    240240void JIT::emitSlow_op_get_by_val(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    241241{
    242     unsigned dst = currentInstruction[1].u.operand;
    243     unsigned base = currentInstruction[2].u.operand;
    244     unsigned property = currentInstruction[3].u.operand;
     242    int dst = currentInstruction[1].u.operand;
     243    int base = currentInstruction[2].u.operand;
     244    int property = currentInstruction[3].u.operand;
    245245    ArrayProfile* profile = currentInstruction[4].u.arrayProfile;
    246246   
     
    284284void JIT::emit_op_put_by_val(Instruction* currentInstruction)
    285285{
    286     unsigned base = currentInstruction[1].u.operand;
    287     unsigned property = currentInstruction[2].u.operand;
     286    int base = currentInstruction[1].u.operand;
     287    int property = currentInstruction[2].u.operand;
    288288    ArrayProfile* profile = currentInstruction[4].u.arrayProfile;
    289289   
     
    328328JIT::JumpList JIT::emitGenericContiguousPutByVal(Instruction* currentInstruction, PatchableJump& badType, IndexingType indexingShape)
    329329{
    330     unsigned value = currentInstruction[3].u.operand;
     330    int value = currentInstruction[3].u.operand;
    331331    ArrayProfile* profile = currentInstruction[4].u.arrayProfile;
    332332   
     
    384384JIT::JumpList JIT::emitArrayStoragePutByVal(Instruction* currentInstruction, PatchableJump& badType)
    385385{
    386     unsigned value = currentInstruction[3].u.operand;
     386    int value = currentInstruction[3].u.operand;
    387387    ArrayProfile* profile = currentInstruction[4].u.arrayProfile;
    388388   
     
    420420void JIT::emitSlow_op_put_by_val(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    421421{
    422     unsigned base = currentInstruction[1].u.operand;
    423     unsigned property = currentInstruction[2].u.operand;
    424     unsigned value = currentInstruction[3].u.operand;
     422    int base = currentInstruction[1].u.operand;
     423    int property = currentInstruction[2].u.operand;
     424    int value = currentInstruction[3].u.operand;
    425425    ArrayProfile* profile = currentInstruction[4].u.arrayProfile;
    426426   
     
    11971197void JIT::emit_op_get_by_pname(Instruction* currentInstruction)
    11981198{
    1199     unsigned dst = currentInstruction[1].u.operand;
    1200     unsigned base = currentInstruction[2].u.operand;
    1201     unsigned property = currentInstruction[3].u.operand;
     1199    int dst = currentInstruction[1].u.operand;
     1200    int base = currentInstruction[2].u.operand;
     1201    int property = currentInstruction[3].u.operand;
    12021202    unsigned expected = currentInstruction[4].u.operand;
    1203     unsigned iter = currentInstruction[5].u.operand;
    1204     unsigned i = currentInstruction[6].u.operand;
     1203    int iter = currentInstruction[5].u.operand;
     1204    int i = currentInstruction[6].u.operand;
    12051205   
    12061206    emitLoad2(property, regT1, regT0, base, regT3, regT2);
     
    12291229void JIT::emitSlow_op_get_by_pname(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    12301230{
    1231     unsigned dst = currentInstruction[1].u.operand;
    1232     unsigned base = currentInstruction[2].u.operand;
    1233     unsigned property = currentInstruction[3].u.operand;
     1231    int dst = currentInstruction[1].u.operand;
     1232    int base = currentInstruction[2].u.operand;
     1233    int property = currentInstruction[3].u.operand;
    12341234   
    12351235    linkSlowCaseIfNotJSCell(iter, property);
     
    12521252}
    12531253
    1254 void JIT::emitResolveClosure(unsigned dst, bool needsVarInjectionChecks, unsigned depth)
     1254void JIT::emitResolveClosure(int dst, bool needsVarInjectionChecks, unsigned depth)
    12551255{
    12561256    emitVarInjectionCheck(needsVarInjectionChecks);
     
    12711271void JIT::emit_op_resolve_scope(Instruction* currentInstruction)
    12721272{
    1273     unsigned dst = currentInstruction[1].u.operand;
     1273    int dst = currentInstruction[1].u.operand;
    12741274    ResolveType resolveType = static_cast<ResolveType>(currentInstruction[3].u.operand);
    12751275    unsigned depth = currentInstruction[4].u.operand;
     
    12981298void JIT::emitSlow_op_resolve_scope(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    12991299{
    1300     unsigned dst = currentInstruction[1].u.operand;
     1300    int dst = currentInstruction[1].u.operand;
    13011301    ResolveType resolveType = static_cast<ResolveType>(currentInstruction[3].u.operand);
    13021302
     
    13111311}
    13121312
    1313 void JIT::emitLoadWithStructureCheck(unsigned scope, Structure** structureSlot)
     1313void JIT::emitLoadWithStructureCheck(int scope, Structure** structureSlot)
    13141314{
    13151315    emitLoad(scope, regT1, regT0);
     
    13311331}
    13321332
    1333 void JIT::emitGetClosureVar(unsigned scope, uintptr_t operand)
     1333void JIT::emitGetClosureVar(int scope, uintptr_t operand)
    13341334{
    13351335    emitLoad(scope, regT1, regT0);
     
    13411341void JIT::emit_op_get_from_scope(Instruction* currentInstruction)
    13421342{
    1343     unsigned dst = currentInstruction[1].u.operand;
    1344     unsigned scope = currentInstruction[2].u.operand;
     1343    int dst = currentInstruction[1].u.operand;
     1344    int scope = currentInstruction[2].u.operand;
    13451345    ResolveType resolveType = ResolveModeAndType(currentInstruction[4].u.operand).type();
    13461346    Structure** structureSlot = currentInstruction[5].u.structure.slot();
     
    13741374void JIT::emitSlow_op_get_from_scope(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
    13751375{
    1376     unsigned dst = currentInstruction[1].u.operand;
     1376    int dst = currentInstruction[1].u.operand;
    13771377    ResolveType resolveType = ResolveModeAndType(currentInstruction[4].u.operand).type();
    13781378
     
    13881388}
    13891389
    1390 void JIT::emitPutGlobalProperty(uintptr_t* operandSlot, unsigned value)
     1390void JIT::emitPutGlobalProperty(uintptr_t* operandSlot, int value)
    13911391{
    13921392    loadPtr(Address(regT0, JSObject::butterflyOffset()), regT0);
     
    13981398}
    13991399
    1400 void JIT::emitPutGlobalVar(uintptr_t operand, unsigned value)
     1400void JIT::emitPutGlobalVar(uintptr_t operand, int value)
    14011401{
    14021402    emitLoad(value, regT1, regT0);
     
    14051405}
    14061406
    1407 void JIT::emitPutClosureVar(unsigned scope, uintptr_t operand, unsigned value)
     1407void JIT::emitPutClosureVar(int scope, uintptr_t operand, int value)
    14081408{
    14091409    emitLoad(value, regT3, regT2);
     
    14161416void JIT::emit_op_put_to_scope(Instruction* currentInstruction)
    14171417{
    1418     unsigned scope = currentInstruction[1].u.operand;
    1419     unsigned value = currentInstruction[3].u.operand;
     1418    int scope = currentInstruction[1].u.operand;
     1419    int value = currentInstruction[3].u.operand;
    14201420    ResolveType resolveType = ResolveModeAndType(currentInstruction[4].u.operand).type();
    14211421    Structure** structureSlot = currentInstruction[5].u.structure.slot();
  • trunk/Source/JavaScriptCore/jit/JITStubCall.h

    r153231 r155418  
    175175
    176176#if USE(JSVALUE32_64)
    177         void addArgument(unsigned srcVirtualRegister)
     177        void addArgument(int srcVirtualRegister)
    178178        {
    179179            if (m_jit->m_codeBlock->isConstantRegisterIndex(srcVirtualRegister)) {
     
    193193        }
    194194#else
    195         void addArgument(unsigned src, JIT::RegisterID scratchRegister) // src is a virtual register.
     195        void addArgument(int src, JIT::RegisterID scratchRegister) // src is a virtual register.
    196196        {
    197197            if (m_jit->m_codeBlock->isConstantRegisterIndex(src))
     
    231231
    232232#if USE(JSVALUE32_64)
    233         JIT::Call call(unsigned dst) // dst is a virtual register.
     233        JIT::Call call(int dst) // dst is a virtual register.
    234234        {
    235235            ASSERT(m_returnType == Value || m_returnType == Cell);
     
    242242        }
    243243       
    244         JIT::Call callWithValueProfiling(unsigned dst)
     244        JIT::Call callWithValueProfiling(int dst)
    245245        {
    246246            ASSERT(m_returnType == Value || m_returnType == Cell);
     
    257257        }
    258258#else
    259         JIT::Call call(unsigned dst) // dst is a virtual register.
     259        JIT::Call call(int dst) // dst is a virtual register.
    260260        {
    261261            ASSERT(m_returnType == Value || m_returnType == Cell);
     
    265265        }
    266266       
    267         JIT::Call callWithValueProfiling(unsigned dst)
     267        JIT::Call callWithValueProfiling(int dst)
    268268        {
    269269            ASSERT(m_returnType == Value || m_returnType == Cell);
Note: See TracChangeset for help on using the changeset viewer.