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/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];
Note: See TracChangeset for help on using the changeset viewer.