Ignore:
Timestamp:
Sep 9, 2013, 11:01:03 PM (12 years ago)
Author:
[email protected]
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:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.