Commit 7535bbdc authored by msaboff@apple.com's avatar msaboff@apple.com

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:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155418 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4d5bc95f
2013-09-09 Michael Saboff <msaboff@apple.com>
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:
2013-09-09 Michael Saboff <msaboff@apple.com>
Add local to/from operand helpers similar to argument to/from operand2
......
......@@ -97,7 +97,7 @@ struct InlineCallFrame {
WriteBarrier<JSFunction> callee; // This may be null, indicating that this is a closure call and that the JSFunction and JSScope are already on the stack.
CodeOrigin caller;
BitVector capturedVars; // Indexed by the machine call frame's variable numbering.
unsigned stackOffset : 31;
signed int stackOffset : 31;
bool isCall : 1;
CodeSpecializationKind specializationKind() const { return specializationFromIsCall(isCall); }
......
......@@ -214,8 +214,9 @@ private:
return getArgument(operand);
// Must be a local.
return getLocal((unsigned)operand);
return getLocal(operand);
}
Node* get(int operand)
{
if (operand == JSStack::Callee) {
......@@ -227,6 +228,7 @@ private:
return getDirect(m_inlineStackTop->remapOperand(operand));
}
enum SetMode { NormalSet, SetOnEntry };
void setDirect(int operand, Node* value, SetMode setMode = NormalSet)
{
......@@ -237,8 +239,9 @@ private:
}
// Must be a local.
setLocal((unsigned)operand, value, setMode);
setLocal(operand, value, setMode);
}
void set(int operand, Node* value, SetMode setMode = NormalSet)
{
setDirect(m_inlineStackTop->remapOperand(operand), value, setMode);
......@@ -259,7 +262,7 @@ private:
}
// Used in implementing get/set, above, where the operand is a local variable.
Node* getLocal(unsigned operand)
Node* getLocal(int operand)
{
unsigned local = operandToLocal(operand);
Node* node = m_currentBlock->variablesAtTail.local(local);
......@@ -296,7 +299,8 @@ private:
m_currentBlock->variablesAtTail.local(local) = node;
return node;
}
void setLocal(unsigned operand, Node* value, SetMode setMode = NormalSet)
void setLocal(int operand, Node* value, SetMode setMode = NormalSet)
{
unsigned local = operandToLocal(operand);
bool isCaptured = m_codeBlock->isCaptured(operand, inlineCallFrame());
......@@ -2089,14 +2093,14 @@ bool ByteCodeParser::parseBlock(unsigned limit)
// === Increment/Decrement opcodes ===
case op_inc: {
unsigned srcDst = currentInstruction[1].u.operand;
int srcDst = currentInstruction[1].u.operand;
Node* op = get(srcDst);
set(srcDst, makeSafe(addToGraph(ArithAdd, op, one())));
NEXT_OPCODE(op_inc);
}
case op_dec: {
unsigned srcDst = currentInstruction[1].u.operand;
int srcDst = currentInstruction[1].u.operand;
Node* op = get(srcDst);
set(srcDst, makeSafe(addToGraph(ArithSub, op, one())));
NEXT_OPCODE(op_dec);
......@@ -2996,7 +3000,7 @@ bool ByteCodeParser::parseBlock(unsigned limit)
LAST_OPCODE(op_jneq_ptr);
case op_resolve_scope: {
unsigned dst = currentInstruction[1].u.operand;
int dst = currentInstruction[1].u.operand;
ResolveType resolveType = static_cast<ResolveType>(currentInstruction[3].u.operand);
unsigned depth = currentInstruction[4].u.operand;
......@@ -3023,7 +3027,7 @@ bool ByteCodeParser::parseBlock(unsigned limit)
}
case op_get_from_scope: {
unsigned dst = currentInstruction[1].u.operand;
int dst = currentInstruction[1].u.operand;
unsigned scope = currentInstruction[2].u.operand;
unsigned identifierNumber = m_inlineStackTop->m_identifierRemap[currentInstruction[3].u.operand];
StringImpl* uid = m_graph.identifiers()[identifierNumber];
......
......@@ -438,7 +438,7 @@ namespace JSC {
enum CompileOpStrictEqType { OpStrictEq, OpNStrictEq };
void compileOpStrictEq(Instruction* instruction, CompileOpStrictEqType type);
bool isOperandConstantImmediateDouble(unsigned src);
bool isOperandConstantImmediateDouble(int src);
void emitLoadDouble(int index, FPRegisterID value);
void emitLoadInt32ToDouble(int index, FPRegisterID value);
......@@ -509,7 +509,7 @@ namespace JSC {
enum FinalObjectMode { MayBeFinal, KnownNotFinal };
#if USE(JSVALUE32_64)
bool getOperandConstantImmediateInt(unsigned op1, unsigned op2, unsigned& op, int32_t& constant);
bool getOperandConstantImmediateInt(int op1, int op2, int& op, int32_t& constant);
void emitLoadTag(int index, RegisterID tag);
void emitLoadPayload(int index, RegisterID payload);
......@@ -546,9 +546,9 @@ namespace JSC {
void compilePutDirectOffset(RegisterID base, RegisterID valueTag, RegisterID valuePayload, PropertyOffset cachedOffset);
// Arithmetic opcode helpers
void emitAdd32Constant(unsigned dst, unsigned op, int32_t constant, ResultType opType);
void emitSub32Constant(unsigned dst, unsigned op, int32_t constant, ResultType opType);
void emitBinaryDoubleOp(OpcodeID, unsigned dst, unsigned op1, unsigned op2, OperandTypes, JumpList& notInt32Op1, JumpList& notInt32Op2, bool op1IsInRegisters = true, bool op2IsInRegisters = true);
void emitAdd32Constant(int dst, int op, int32_t constant, ResultType opType);
void emitSub32Constant(int dst, int op, int32_t constant, ResultType opType);
void emitBinaryDoubleOp(OpcodeID, int dst, int op1, int op2, OperandTypes, JumpList& notInt32Op1, JumpList& notInt32Op2, bool op1IsInRegisters = true, bool op2IsInRegisters = true);
#if CPU(ARM_TRADITIONAL)
// sequenceOpCall
......@@ -580,17 +580,17 @@ namespace JSC {
#else // USE(JSVALUE32_64)
/* This function is deprecated. */
void emitGetJITStubArg(unsigned argumentNumber, RegisterID dst);
void emitGetJITStubArg(int argumentNumber, RegisterID dst);
void emitGetVirtualRegister(int src, RegisterID dst);
void emitGetVirtualRegisters(int src1, RegisterID dst1, int src2, RegisterID dst2);
void emitPutVirtualRegister(unsigned dst, RegisterID from = regT0);
void emitStoreCell(unsigned dst, RegisterID payload, bool /* only used in JSValue32_64 */ = false)
void emitPutVirtualRegister(int dst, RegisterID from = regT0);
void emitStoreCell(int dst, RegisterID payload, bool /* only used in JSValue32_64 */ = false)
{
emitPutVirtualRegister(dst, payload);
}
int32_t getConstantOperandImmediateInt(unsigned src);
int32_t getConstantOperandImmediateInt(int src);
void killLastResultRegister();
......@@ -609,8 +609,8 @@ namespace JSC {
void emitFastArithReTagImmediate(RegisterID src, RegisterID dest);
void emitTagAsBoolImmediate(RegisterID reg);
void compileBinaryArithOp(OpcodeID, unsigned dst, unsigned src1, unsigned src2, OperandTypes opi);
void compileBinaryArithOpSlowCase(Instruction*, OpcodeID, Vector<SlowCaseEntry>::iterator&, unsigned dst, unsigned src1, unsigned src2, OperandTypes, bool op1HasImmediateIntFastCase, bool op2HasImmediateIntFastCase);
void compileBinaryArithOp(OpcodeID, int dst, int src1, int src2, OperandTypes opi);
void compileBinaryArithOpSlowCase(Instruction*, OpcodeID, Vector<SlowCaseEntry>::iterator&, int dst, int src1, int src2, OperandTypes, bool op1HasImmediateIntFastCase, bool op2HasImmediateIntFastCase);
void compileGetByIdHotPath(int baseVReg, const Identifier*);
void compileGetByIdSlowCase(int resultVReg, int baseVReg, const Identifier*, Vector<SlowCaseEntry>::iterator&);
......@@ -635,8 +635,8 @@ namespace JSC {
#define END_UNINTERRUPTED_SEQUENCE_FOR_PUT(name, dst)
#endif
void emit_compareAndJump(OpcodeID, unsigned op1, unsigned op2, unsigned target, RelationalCondition);
void emit_compareAndJumpSlow(unsigned op1, unsigned op2, unsigned target, DoubleCondition, int (JIT_STUB *stub)(STUB_ARGS_DECLARATION), bool invert, Vector<SlowCaseEntry>::iterator&);
void emit_compareAndJump(OpcodeID, int op1, int op2, unsigned target, RelationalCondition);
void emit_compareAndJumpSlow(int op1, int op2, unsigned target, DoubleCondition, int (JIT_STUB *stub)(STUB_ARGS_DECLARATION), bool invert, Vector<SlowCaseEntry>::iterator&);
void emit_op_add(Instruction*);
void emit_op_bitand(Instruction*);
......@@ -794,16 +794,16 @@ namespace JSC {
void emitRightShiftSlowCase(Instruction*, Vector<SlowCaseEntry>::iterator&, bool isUnsigned);
void emitVarInjectionCheck(bool needsVarInjectionChecks);
void emitResolveClosure(unsigned dst, bool needsVarInjectionChecks, unsigned depth);
void emitLoadWithStructureCheck(unsigned scope, Structure** structureSlot);
void emitResolveClosure(int dst, bool needsVarInjectionChecks, unsigned depth);
void emitLoadWithStructureCheck(int scope, Structure** structureSlot);
void emitGetGlobalProperty(uintptr_t* operandSlot);
void emitGetGlobalVar(uintptr_t operand);
void emitGetClosureVar(unsigned scope, uintptr_t operand);
void emitPutGlobalProperty(uintptr_t* operandSlot, unsigned value);
void emitPutGlobalVar(uintptr_t operand, unsigned value);
void emitPutClosureVar(unsigned scope, uintptr_t operand, unsigned value);
void emitGetClosureVar(int scope, uintptr_t operand);
void emitPutGlobalProperty(uintptr_t* operandSlot, int value);
void emitPutGlobalVar(uintptr_t operand, int value);
void emitPutClosureVar(int scope, uintptr_t operand, int value);
void emitInitRegister(unsigned dst);
void emitInitRegister(int dst);
void emitPutIntToCallFrameHeader(RegisterID from, JSStack::CallFrameHeaderEntry);
void emitGetFromCallFrameHeaderPtr(JSStack::CallFrameHeaderEntry, RegisterID to, RegisterID from = callFrameRegister);
......@@ -812,9 +812,9 @@ namespace JSC {
void emitGetFromCallFrameHeader64(JSStack::CallFrameHeaderEntry, RegisterID to, RegisterID from = callFrameRegister);
#endif
JSValue getConstantOperand(unsigned src);
bool isOperandConstantImmediateInt(unsigned src);
bool isOperandConstantImmediateChar(unsigned src);
JSValue getConstantOperand(int src);
bool isOperandConstantImmediateInt(int src);
bool isOperandConstantImmediateChar(int src);
bool atJumpTarget();
......@@ -851,7 +851,7 @@ namespace JSC {
#endif
#ifndef NDEBUG
void printBytecodeOperandTypes(unsigned src1, unsigned src2);
void printBytecodeOperandTypes(int src1, int src2);
#endif
#if ENABLE(SAMPLING_FLAGS)
......
This diff is collapsed.
......@@ -33,12 +33,12 @@
namespace JSC {
ALWAYS_INLINE bool JIT::isOperandConstantImmediateDouble(unsigned src)
ALWAYS_INLINE bool JIT::isOperandConstantImmediateDouble(int src)
{
return m_codeBlock->isConstantRegisterIndex(src) && getConstantOperand(src).isDouble();
}
ALWAYS_INLINE JSValue JIT::getConstantOperand(unsigned src)
ALWAYS_INLINE JSValue JIT::getConstantOperand(int src)
{
ASSERT(m_codeBlock->isConstantRegisterIndex(src));
return m_codeBlock->getConstant(src);
......@@ -312,7 +312,7 @@ ALWAYS_INLINE void JIT::sampleCodeBlock(CodeBlock* codeBlock)
#endif
#endif
ALWAYS_INLINE bool JIT::isOperandConstantImmediateChar(unsigned src)
ALWAYS_INLINE bool JIT::isOperandConstantImmediateChar(int src)
{
return m_codeBlock->isConstantRegisterIndex(src) && getConstantOperand(src).isString() && asString(getConstantOperand(src).asCell())->length() == 1;
}
......@@ -605,7 +605,7 @@ inline void JIT::emitStore(int index, const JSValue constant, RegisterID base)
store32(Imm32(constant.tag()), tagFor(index, base));
}
ALWAYS_INLINE void JIT::emitInitRegister(unsigned dst)
ALWAYS_INLINE void JIT::emitInitRegister(int dst)
{
emitStore(dst, jsUndefined());
}
......@@ -705,12 +705,12 @@ inline void JIT::emitJumpSlowCaseIfNotJSCell(int virtualRegisterIndex, RegisterI
}
}
ALWAYS_INLINE bool JIT::isOperandConstantImmediateInt(unsigned src)
ALWAYS_INLINE bool JIT::isOperandConstantImmediateInt(int src)
{
return m_codeBlock->isConstantRegisterIndex(src) && getConstantOperand(src).isInt32();
}
ALWAYS_INLINE bool JIT::getOperandConstantImmediateInt(unsigned op1, unsigned op2, unsigned& op, int32_t& constant)
ALWAYS_INLINE bool JIT::getOperandConstantImmediateInt(int op1, int op2, int& op, int32_t& constant)
{
if (isOperandConstantImmediateInt(op1)) {
constant = getConstantOperand(op1).asInt32();
......@@ -731,9 +731,9 @@ ALWAYS_INLINE bool JIT::getOperandConstantImmediateInt(unsigned op1, unsigned op
/* Deprecated: Please use JITStubCall instead. */
ALWAYS_INLINE void JIT::emitGetJITStubArg(unsigned argumentNumber, RegisterID dst)
ALWAYS_INLINE void JIT::emitGetJITStubArg(int argumentNumber, RegisterID dst)
{
unsigned argumentStackOffset = (argumentNumber * (sizeof(JSValue) / sizeof(void*))) + JITSTACKFRAME_ARGS_INDEX;
int argumentStackOffset = (argumentNumber * (sizeof(JSValue) / sizeof(void*))) + JITSTACKFRAME_ARGS_INDEX;
peek64(dst, argumentStackOffset);
}
......@@ -781,23 +781,23 @@ ALWAYS_INLINE void JIT::emitGetVirtualRegisters(int src1, RegisterID dst1, int s
}
}
ALWAYS_INLINE int32_t JIT::getConstantOperandImmediateInt(unsigned src)
ALWAYS_INLINE int32_t JIT::getConstantOperandImmediateInt(int src)
{
return getConstantOperand(src).asInt32();
}
ALWAYS_INLINE bool JIT::isOperandConstantImmediateInt(unsigned src)
ALWAYS_INLINE bool JIT::isOperandConstantImmediateInt(int src)
{
return m_codeBlock->isConstantRegisterIndex(src) && getConstantOperand(src).isInt32();
}
ALWAYS_INLINE void JIT::emitPutVirtualRegister(unsigned dst, RegisterID from)
ALWAYS_INLINE void JIT::emitPutVirtualRegister(int dst, RegisterID from)
{
store64(from, Address(callFrameRegister, dst * sizeof(Register)));
m_lastResultBytecodeRegister = (from == cachedResultRegister) ? static_cast<int>(dst) : std::numeric_limits<int>::max();
m_lastResultBytecodeRegister = (from == cachedResultRegister) ? dst : std::numeric_limits<int>::max();
}
ALWAYS_INLINE void JIT::emitInitRegister(unsigned dst)
ALWAYS_INLINE void JIT::emitInitRegister(int dst)
{
store64(TrustedImm64(JSValue::encode(jsUndefined())), Address(callFrameRegister, dst * sizeof(Register)));
}
......
......@@ -119,7 +119,7 @@ void JIT::emitSlow_op_new_object(Instruction* currentInstruction, Vector<SlowCas
void JIT::emit_op_check_has_instance(Instruction* currentInstruction)
{
unsigned baseVal = currentInstruction[3].u.operand;
int baseVal = currentInstruction[3].u.operand;
emitGetVirtualRegister(baseVal, regT0);
......@@ -133,9 +133,9 @@ void JIT::emit_op_check_has_instance(Instruction* currentInstruction)
void JIT::emit_op_instanceof(Instruction* currentInstruction)
{
unsigned dst = currentInstruction[1].u.operand;
unsigned value = currentInstruction[2].u.operand;
unsigned proto = currentInstruction[3].u.operand;
int dst = currentInstruction[1].u.operand;
int value = currentInstruction[2].u.operand;
int proto = currentInstruction[3].u.operand;
// Load the operands (baseVal, proto, and value respectively) into registers.
// We use regT0 for baseVal since we will be done with this first, and we can then use it for the result.
......@@ -173,8 +173,8 @@ void JIT::emit_op_instanceof(Instruction* currentInstruction)
void JIT::emit_op_is_undefined(Instruction* currentInstruction)
{
unsigned dst = currentInstruction[1].u.operand;
unsigned value = currentInstruction[2].u.operand;
int dst = currentInstruction[1].u.operand;
int value = currentInstruction[2].u.operand;
emitGetVirtualRegister(value, regT0);
Jump isCell = emitJumpIfJSCell(regT0);
......@@ -201,8 +201,8 @@ void JIT::emit_op_is_undefined(Instruction* currentInstruction)
void JIT::emit_op_is_boolean(Instruction* currentInstruction)
{
unsigned dst = currentInstruction[1].u.operand;
unsigned value = currentInstruction[2].u.operand;
int dst = currentInstruction[1].u.operand;
int value = currentInstruction[2].u.operand;
emitGetVirtualRegister(value, regT0);
xor64(TrustedImm32(static_cast<int32_t>(ValueFalse)), regT0);
......@@ -213,8 +213,8 @@ void JIT::emit_op_is_boolean(Instruction* currentInstruction)
void JIT::emit_op_is_number(Instruction* currentInstruction)
{
unsigned dst = currentInstruction[1].u.operand;
unsigned value = currentInstruction[2].u.operand;
int dst = currentInstruction[1].u.operand;
int value = currentInstruction[2].u.operand;
emitGetVirtualRegister(value, regT0);
test64(NonZero, regT0, tagTypeNumberRegister, regT0);
......@@ -224,8 +224,8 @@ void JIT::emit_op_is_number(Instruction* currentInstruction)
void JIT::emit_op_is_string(Instruction* currentInstruction)
{
unsigned dst = currentInstruction[1].u.operand;
unsigned value = currentInstruction[2].u.operand;
int dst = currentInstruction[1].u.operand;
int value = currentInstruction[2].u.operand;
emitGetVirtualRegister(value, regT0);
Jump isNotCell = emitJumpIfNotJSCell(regT0);
......@@ -376,7 +376,7 @@ void JIT::emit_op_jfalse(Instruction* currentInstruction)
void JIT::emit_op_jeq_null(Instruction* currentInstruction)
{
unsigned src = currentInstruction[1].u.operand;
int src = currentInstruction[1].u.operand;
unsigned target = currentInstruction[2].u.operand;
emitGetVirtualRegister(src, regT0);
......@@ -399,7 +399,7 @@ void JIT::emit_op_jeq_null(Instruction* currentInstruction)
};
void JIT::emit_op_jneq_null(Instruction* currentInstruction)
{
unsigned src = currentInstruction[1].u.operand;
int src = currentInstruction[1].u.operand;
unsigned target = currentInstruction[2].u.operand;
emitGetVirtualRegister(src, regT0);
......@@ -422,7 +422,7 @@ void JIT::emit_op_jneq_null(Instruction* currentInstruction)
void JIT::emit_op_jneq_ptr(Instruction* currentInstruction)
{
unsigned src = currentInstruction[1].u.operand;
int src = currentInstruction[1].u.operand;
Special::Pointer ptr = currentInstruction[2].u.specialPointer;
unsigned target = currentInstruction[3].u.operand;
......@@ -617,9 +617,9 @@ void JIT::emit_op_pop_scope(Instruction*)
void JIT::compileOpStrictEq(Instruction* currentInstruction, CompileOpStrictEqType type)
{
unsigned dst = currentInstruction[1].u.operand;
unsigned src1 = currentInstruction[2].u.operand;
unsigned src2 = currentInstruction[3].u.operand;
int dst = currentInstruction[1].u.operand;
int src1 = currentInstruction[2].u.operand;
int src2 = currentInstruction[3].u.operand;
emitGetVirtualRegisters(src1, regT0, src2, regT1);
......@@ -766,8 +766,8 @@ void JIT::emit_op_debug(Instruction* currentInstruction)
void JIT::emit_op_eq_null(Instruction* currentInstruction)
{
unsigned dst = currentInstruction[1].u.operand;
unsigned src1 = currentInstruction[2].u.operand;
int dst = currentInstruction[1].u.operand;
int src1 = currentInstruction[2].u.operand;
emitGetVirtualRegister(src1, regT0);
Jump isImmediate = emitJumpIfNotJSCell(regT0);
......@@ -798,8 +798,8 @@ void JIT::emit_op_eq_null(Instruction* currentInstruction)
void JIT::emit_op_neq_null(Instruction* currentInstruction)
{
unsigned dst = currentInstruction[1].u.operand;
unsigned src1 = currentInstruction[2].u.operand;
int dst = currentInstruction[1].u.operand;
int src1 = currentInstruction[2].u.operand;
emitGetVirtualRegister(src1, regT0);
Jump isImmediate = emitJumpIfNotJSCell(regT0);
......@@ -841,7 +841,7 @@ void JIT::emit_op_enter(Instruction*)
void JIT::emit_op_create_activation(Instruction* currentInstruction)
{
unsigned dst = currentInstruction[1].u.operand;
int dst = currentInstruction[1].u.operand;
Jump activationCreated = branchTest64(NonZero, Address(callFrameRegister, sizeof(Register) * dst));
JITStubCall(this, cti_op_push_activation).call(currentInstruction[1].u.operand);
......@@ -851,7 +851,7 @@ void JIT::emit_op_create_activation(Instruction* currentInstruction)
void JIT::emit_op_create_arguments(Instruction* currentInstruction)
{
unsigned dst = currentInstruction[1].u.operand;
int dst = currentInstruction[1].u.operand;
Jump argsCreated = branchTest64(NonZero, Address(callFrameRegister, sizeof(Register) * dst));
JITStubCall(this, cti_op_create_arguments).call();
......@@ -862,7 +862,7 @@ void JIT::emit_op_create_arguments(Instruction* currentInstruction)
void JIT::emit_op_init_lazy_reg(Instruction* currentInstruction)
{
unsigned dst = currentInstruction[1].u.operand;
int dst = currentInstruction[1].u.operand;
store64(TrustedImm64((int64_t)0), Address(callFrameRegister, sizeof(Register) * dst));
}
......@@ -881,7 +881,7 @@ void JIT::emit_op_to_this(Instruction* currentInstruction)
void JIT::emit_op_get_callee(Instruction* currentInstruction)
{
unsigned result = currentInstruction[1].u.operand;
int result = currentInstruction[1].u.operand;
emitGetFromCallFrameHeaderPtr(JSStack::Callee, regT0);
emitValueProfilingSite(regT4);
emitPutVirtualRegister(result);
......@@ -1039,9 +1039,9 @@ void JIT::emitSlow_op_nstricteq(Instruction* currentInstruction, Vector<SlowCase
void JIT::emitSlow_op_check_has_instance(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
{
unsigned dst = currentInstruction[1].u.operand;
unsigned value = currentInstruction[2].u.operand;
unsigned baseVal = currentInstruction[3].u.operand;
int dst = currentInstruction[1].u.operand;
int value = currentInstruction[2].u.operand;
int baseVal = currentInstruction[3].u.operand;
linkSlowCaseIfNotJSCell(iter, baseVal);
linkSlowCase(iter);
......@@ -1055,9 +1055,9 @@ void JIT::emitSlow_op_check_has_instance(Instruction* currentInstruction, Vector
void JIT::emitSlow_op_instanceof(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
{
unsigned dst = currentInstruction[1].u.operand;
unsigned value = currentInstruction[2].u.operand;
unsigned proto = currentInstruction[3].u.operand;
int dst = currentInstruction[1].u.operand;
int value = currentInstruction[2].u.operand;
int proto = currentInstruction[3].u.operand;
linkSlowCaseIfNotJSCell(iter, value);
linkSlowCaseIfNotJSCell(iter, proto);
......@@ -1091,8 +1091,8 @@ void JIT::emit_op_get_arguments_length(Instruction* currentInstruction)
void JIT::emitSlow_op_get_arguments_length(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
{
linkSlowCase(iter);
unsigned dst = currentInstruction[1].u.operand;
unsigned base = currentInstruction[2].u.operand;
int dst = currentInstruction[1].u.operand;
int base = currentInstruction[2].u.operand;
const Identifier* ident = &(m_codeBlock->identifier(currentInstruction[3].u.operand));
emitGetVirtualRegister(base, regT0);
......@@ -1124,9 +1124,9 @@ void JIT::emit_op_get_argument_by_val(Instruction* currentInstruction)
void JIT::emitSlow_op_get_argument_by_val(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
{
unsigned dst = currentInstruction[1].u.operand;
unsigned arguments = currentInstruction[2].u.operand;
unsigned property = currentInstruction[3].u.operand;
int dst = currentInstruction[1].u.operand;
int arguments = currentInstruction[2].u.operand;
int property = currentInstruction[3].u.operand;
linkSlowCase(iter);
Jump skipArgumentsCreation = jump();
......
......@@ -174,7 +174,7 @@ namespace JSC {
}
#if USE(JSVALUE32_64)
void addArgument(unsigned srcVirtualRegister)
void addArgument(int srcVirtualRegister)
{
if (m_jit->m_codeBlock->isConstantRegisterIndex(srcVirtualRegister)) {
addArgument(m_jit->getConstantOperand(srcVirtualRegister));
......@@ -192,7 +192,7 @@ namespace JSC {
m_jit->peek(tag, stackIndex + 1);
}
#else
void addArgument(unsigned src, JIT::RegisterID scratchRegister) // src is a virtual register.
void addArgument(int src, JIT::RegisterID scratchRegister) // src is a virtual register.
{
if (m_jit->m_codeBlock->isConstantRegisterIndex(src))
addArgument(JIT::Imm64(JSValue::encode(m_jit->m_codeBlock->getConstant(src))));
......@@ -230,7 +230,7 @@ namespace JSC {
}
#if USE(JSVALUE32_64)
JIT::Call call(unsigned dst) // dst is a virtual register.
JIT::Call call(int dst) // dst is a virtual register.
{
ASSERT(m_returnType == Value || m_returnType == Cell);
JIT::Call call = this->call();
......@@ -241,7 +241,7 @@ namespace JSC {
return call;
}
JIT::Call callWithValueProfiling(unsigned dst)
JIT::Call callWithValueProfiling(int dst)
{
ASSERT(m_returnType == Value || m_returnType == Cell);
JIT::Call call = this->call();
......@@ -256,7 +256,7 @@ namespace JSC {
return call;
}
#else
JIT::Call call(unsigned dst) // dst is a virtual register.
JIT::Call call(int dst) // dst is a virtual register.
{
ASSERT(m_returnType == Value || m_returnType == Cell);
JIT::Call call = this->call();
......@@ -264,7 +264,7 @@ namespace JSC {
return call;
}
JIT::Call callWithValueProfiling(unsigned dst)
JIT::Call callWithValueProfiling(int dst)
{
ASSERT(m_returnType == Value || m_returnType == Cell);
JIT::Call call = this->call();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment