32-bit Build fix: declare virtual register indices to be int rather than
unsigned, since they can be positive or negative.
        
For better clarity, explicitly use ReturnPC instead of -1 as the "invalid"
state, since we'll never load and operate on the ReturnPC as a JS value.

* jit/JIT.cpp:
(JSC::JIT::JIT):
* jit/JIT.h:
* jit/JITInlineMethods.h:
(JSC::JIT::emitLoadTag):
(JSC::JIT::emitLoadPayload):
(JSC::JIT::emitLoad):
(JSC::JIT::emitLoad2):
(JSC::JIT::emitLoadDouble):
(JSC::JIT::emitLoadInt32ToDouble):
(JSC::JIT::emitStore):
(JSC::JIT::emitStoreInt32):
(JSC::JIT::emitStoreAndMapInt32):
(JSC::JIT::emitStoreCell):
(JSC::JIT::emitStoreBool):
(JSC::JIT::emitStoreDouble):
(JSC::JIT::map):
(JSC::JIT::unmap):
(JSC::JIT::isMapped):
(JSC::JIT::getMappedPayload):
(JSC::JIT::getMappedTag):
(JSC::JIT::emitJumpSlowCaseIfNotJSCell):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@100171 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/jit/JIT.h b/Source/JavaScriptCore/jit/JIT.h
index e349b54..f3d9194 100644
--- a/Source/JavaScriptCore/jit/JIT.h
+++ b/Source/JavaScriptCore/jit/JIT.h
@@ -312,8 +312,8 @@
         void compileOpStrictEq(Instruction* instruction, CompileOpStrictEqType type);
         bool isOperandConstantImmediateDouble(unsigned src);
         
-        void emitLoadDouble(unsigned index, FPRegisterID value);
-        void emitLoadInt32ToDouble(unsigned index, FPRegisterID value);
+        void emitLoadDouble(int index, FPRegisterID value);
+        void emitLoadInt32ToDouble(int index, FPRegisterID value);
         Jump emitJumpIfNotObject(RegisterID structureReg);
         Jump emitJumpIfNotType(RegisterID baseReg, RegisterID scratchReg, JSType);
 
@@ -341,33 +341,32 @@
 #if USE(JSVALUE32_64)
         bool getOperandConstantImmediateInt(unsigned op1, unsigned op2, unsigned& op, int32_t& constant);
 
-        void emitLoadTag(unsigned index, RegisterID tag);
-        void emitLoadPayload(unsigned index, RegisterID payload);
+        void emitLoadTag(int index, RegisterID tag);
+        void emitLoadPayload(int index, RegisterID payload);
 
         void emitLoad(const JSValue& v, RegisterID tag, RegisterID payload);
-        void emitLoad(unsigned index, RegisterID tag, RegisterID payload, RegisterID base = callFrameRegister);
-        void emitLoad2(unsigned index1, RegisterID tag1, RegisterID payload1, unsigned index2, RegisterID tag2, RegisterID payload2);
+        void emitLoad(int index, RegisterID tag, RegisterID payload, RegisterID base = callFrameRegister);
+        void emitLoad2(int index1, RegisterID tag1, RegisterID payload1, int index2, RegisterID tag2, RegisterID payload2);
 
-        void emitStore(unsigned index, RegisterID tag, RegisterID payload, RegisterID base = callFrameRegister);
-        void emitStore(unsigned index, const JSValue constant, RegisterID base = callFrameRegister);
-        void emitStoreInt32(unsigned index, RegisterID payload, bool indexIsInt32 = false);
-        void emitStoreInt32(unsigned index, TrustedImm32 payload, bool indexIsInt32 = false);
-        void emitStoreAndMapInt32(unsigned index, RegisterID tag, RegisterID payload, bool indexIsInt32, size_t opcodeLength);
-        void emitStoreCell(unsigned index, RegisterID payload, bool indexIsCell = false);
-        void emitStoreBool(unsigned index, RegisterID payload, bool indexIsBool = false);
-        void emitStoreDouble(unsigned index, FPRegisterID value);
+        void emitStore(int index, RegisterID tag, RegisterID payload, RegisterID base = callFrameRegister);
+        void emitStore(int index, const JSValue constant, RegisterID base = callFrameRegister);
+        void emitStoreInt32(int index, RegisterID payload, bool indexIsInt32 = false);
+        void emitStoreInt32(int index, TrustedImm32 payload, bool indexIsInt32 = false);
+        void emitStoreAndMapInt32(int index, RegisterID tag, RegisterID payload, bool indexIsInt32, size_t opcodeLength);
+        void emitStoreCell(int index, RegisterID payload, bool indexIsCell = false);
+        void emitStoreBool(int index, RegisterID payload, bool indexIsBool = false);
+        void emitStoreDouble(int index, FPRegisterID value);
 
         bool isLabeled(unsigned bytecodeOffset);
-        void map(unsigned bytecodeOffset, unsigned virtualRegisterIndex, RegisterID tag, RegisterID payload);
+        void map(unsigned bytecodeOffset, int virtualRegisterIndex, RegisterID tag, RegisterID payload);
         void unmap(RegisterID);
         void unmap();
-        bool isMapped(unsigned virtualRegisterIndex);
-        bool getMappedPayload(unsigned virtualRegisterIndex, RegisterID& payload);
-        bool getMappedTag(unsigned virtualRegisterIndex, RegisterID& tag);
+        bool isMapped(int virtualRegisterIndex);
+        bool getMappedPayload(int virtualRegisterIndex, RegisterID& payload);
+        bool getMappedTag(int virtualRegisterIndex, RegisterID& tag);
 
-        void emitJumpSlowCaseIfNotJSCell(unsigned virtualRegisterIndex);
-        void emitJumpSlowCaseIfNotJSCell(unsigned virtualRegisterIndex, RegisterID tag);
-        void linkSlowCaseIfNotJSCell(Vector<SlowCaseEntry>::iterator&, unsigned virtualRegisterIndex);
+        void emitJumpSlowCaseIfNotJSCell(int virtualRegisterIndex);
+        void emitJumpSlowCaseIfNotJSCell(int virtualRegisterIndex, RegisterID tag);
 
         void compileGetByIdHotPath();
         void compileGetByIdSlowCase(int resultVReg, int baseVReg, Identifier* ident, Vector<SlowCaseEntry>::iterator& iter, bool isMethodCheck = false);
@@ -984,7 +983,7 @@
             ASSERT(!iter->from.isSet());
             ++iter;
         }
-        void linkSlowCaseIfNotJSCell(Vector<SlowCaseEntry>::iterator&, int vReg);
+        void linkSlowCaseIfNotJSCell(Vector<SlowCaseEntry>::iterator&, int virtualRegisterIndex);
 
         Jump checkStructure(RegisterID reg, Structure* structure);
 
@@ -1065,7 +1064,7 @@
 #if USE(JSVALUE32_64)
         unsigned m_jumpTargetIndex;
         unsigned m_mappedBytecodeOffset;
-        unsigned m_mappedVirtualRegisterIndex;
+        int m_mappedVirtualRegisterIndex;
         RegisterID m_mappedTag;
         RegisterID m_mappedPayload;
 #else