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