Switch int8_t to GPRReg in StructureStubInfo because sizeof(GPRReg) == sizeof(int8_t)
[WebKit-https.git] / Source / JavaScriptCore / jit / JITInlineCacheGenerator.cpp
index 2f96977..baf2799 100644 (file)
@@ -76,13 +76,13 @@ JITByIdGenerator::JITByIdGenerator(
     , m_base(base)
     , m_value(value)
 {
-    m_stubInfo->patch.baseGPR = static_cast<int8_t>(base.payloadGPR());
-    m_stubInfo->patch.valueGPR = static_cast<int8_t>(value.payloadGPR());
-    m_stubInfo->patch.thisGPR = static_cast<int8_t>(InvalidGPRReg);
+    m_stubInfo->patch.baseGPR = base.payloadGPR();
+    m_stubInfo->patch.valueGPR = value.payloadGPR();
+    m_stubInfo->patch.thisGPR = InvalidGPRReg;
 #if USE(JSVALUE32_64)
-    m_stubInfo->patch.baseTagGPR = static_cast<int8_t>(base.tagGPR());
-    m_stubInfo->patch.valueTagGPR = static_cast<int8_t>(value.tagGPR());
-    m_stubInfo->patch.thisTagGPR = static_cast<int8_t>(InvalidGPRReg);
+    m_stubInfo->patch.baseTagGPR = base.tagGPR();
+    m_stubInfo->patch.valueTagGPR = value.tagGPR();
+    m_stubInfo->patch.thisTagGPR = InvalidGPRReg;
 #endif
 }
 
@@ -126,9 +126,9 @@ JITGetByIdWithThisGenerator::JITGetByIdWithThisGenerator(
 {
     RELEASE_ASSERT(thisRegs.payloadGPR() != thisRegs.tagGPR());
 
-    m_stubInfo->patch.thisGPR = static_cast<int8_t>(thisRegs.payloadGPR());
+    m_stubInfo->patch.thisGPR = thisRegs.payloadGPR();
 #if USE(JSVALUE32_64)
-    m_stubInfo->patch.thisTagGPR = static_cast<int8_t>(thisRegs.tagGPR());
+    m_stubInfo->patch.thisTagGPR = thisRegs.tagGPR();
 #endif
 }
 
@@ -188,13 +188,13 @@ JITInstanceOfGenerator::JITInstanceOfGenerator(
     : JITInlineCacheGenerator(
         codeBlock, codeOrigin, callSiteIndex, AccessType::InstanceOf, usedRegisters)
 {
-    m_stubInfo->patch.baseGPR = static_cast<int8_t>(value);
-    m_stubInfo->patch.valueGPR = static_cast<int8_t>(result);
-    m_stubInfo->patch.thisGPR = static_cast<int8_t>(prototype);
+    m_stubInfo->patch.baseGPR = value;
+    m_stubInfo->patch.valueGPR = result;
+    m_stubInfo->patch.thisGPR = prototype;
 #if USE(JSVALUE32_64)
-    m_stubInfo->patch.baseTagGPR = static_cast<int8_t>(InvalidGPRReg);
-    m_stubInfo->patch.valueTagGPR = static_cast<int8_t>(InvalidGPRReg);
-    m_stubInfo->patch.thisTagGPR = static_cast<int8_t>(InvalidGPRReg);
+    m_stubInfo->patch.baseTagGPR = InvalidGPRReg;
+    m_stubInfo->patch.valueTagGPR = InvalidGPRReg;
+    m_stubInfo->patch.thisTagGPR = InvalidGPRReg;
 #endif
 
     m_stubInfo->patch.usedRegisters.clear(result);