Title: [132752] trunk/Source/_javascript_Core
Revision
132752
Author
[email protected]
Date
2012-10-28 14:36:50 -0700 (Sun, 28 Oct 2012)

Log Message

Unreviewed, make always-true enum-to-int comparisons use casts.

* dfg/DFGFPRInfo.h:
(JSC::DFG::FPRInfo::debugName):
* dfg/DFGGPRInfo.h:
(JSC::DFG::JSValueSource::tagGPR):
(JSC::DFG::GPRInfo::toIndex):
(JSC::DFG::GPRInfo::debugName):
* runtime/JSTypeInfo.h:
(JSC::TypeInfo::TypeInfo):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (132751 => 132752)


--- trunk/Source/_javascript_Core/ChangeLog	2012-10-28 12:31:04 UTC (rev 132751)
+++ trunk/Source/_javascript_Core/ChangeLog	2012-10-28 21:36:50 UTC (rev 132752)
@@ -1,3 +1,16 @@
+2012-10-28  Filip Pizlo  <[email protected]>
+
+        Unreviewed, make always-true enum-to-int comparisons use casts.
+
+        * dfg/DFGFPRInfo.h:
+        (JSC::DFG::FPRInfo::debugName):
+        * dfg/DFGGPRInfo.h:
+        (JSC::DFG::JSValueSource::tagGPR):
+        (JSC::DFG::GPRInfo::toIndex):
+        (JSC::DFG::GPRInfo::debugName):
+        * runtime/JSTypeInfo.h:
+        (JSC::TypeInfo::TypeInfo):
+
 2012-10-27  Filip Pizlo  <[email protected]>
 
         OSR exit compilation should defend against argument recoveries from code blocks that are no longer on the inline stack

Modified: trunk/Source/_javascript_Core/dfg/DFGFPRInfo.h (132751 => 132752)


--- trunk/Source/_javascript_Core/dfg/DFGFPRInfo.h	2012-10-28 12:31:04 UTC (rev 132751)
+++ trunk/Source/_javascript_Core/dfg/DFGFPRInfo.h	2012-10-28 21:36:50 UTC (rev 132752)
@@ -82,7 +82,7 @@
     {
         ASSERT(reg != InvalidFPRReg);
 #if CPU(X86_64)
-        ASSERT(reg < 16);
+        ASSERT(static_cast<int>(reg) < 16);
         static const char* nameForRegister[16] = {
             "xmm0", "xmm1", "xmm2", "xmm3",
             "xmm4", "xmm5", "xmm6", "xmm7",
@@ -90,7 +90,7 @@
             "xmm12", "xmm13", "xmm14", "xmm15"
         };
 #elif CPU(X86)
-        ASSERT(reg < 8);
+        ASSERT(static_cast<int>(reg) < 8);
         static const char* nameForRegister[8] = {
             "xmm0", "xmm1", "xmm2", "xmm3",
             "xmm4", "xmm5", "xmm6", "xmm7"

Modified: trunk/Source/_javascript_Core/dfg/DFGGPRInfo.h (132751 => 132752)


--- trunk/Source/_javascript_Core/dfg/DFGGPRInfo.h	2012-10-28 12:31:04 UTC (rev 132751)
+++ trunk/Source/_javascript_Core/dfg/DFGGPRInfo.h	2012-10-28 21:36:50 UTC (rev 132752)
@@ -218,7 +218,7 @@
     
     GPRReg tagGPR() const
     {
-        ASSERT(!isAddress() && m_baseOrTag != InvalidGPRReg);
+        ASSERT(!isAddress() && static_cast<GPRReg>(m_baseOrTag) != InvalidGPRReg);
         return static_cast<GPRReg>(m_baseOrTag);
     }
     
@@ -290,7 +290,7 @@
     static unsigned toIndex(GPRReg reg)
     {
         ASSERT(reg != InvalidGPRReg);
-        ASSERT(reg < 8);
+        ASSERT(static_cast<int>(reg) < 8);
         static const unsigned indexForRegister[8] = { 0, 2, 1, 3, InvalidIndex, InvalidIndex, 4, InvalidIndex };
         unsigned result = indexForRegister[reg];
         ASSERT(result != InvalidIndex);
@@ -300,7 +300,7 @@
     static const char* debugName(GPRReg reg)
     {
         ASSERT(reg != InvalidGPRReg);
-        ASSERT(reg < 8);
+        ASSERT(static_cast<int>(reg) < 8);
         static const char* nameForRegister[8] = {
             "eax", "ecx", "edx", "ebx",
             "esp", "ebp", "esi", "edi",
@@ -362,7 +362,7 @@
     static unsigned toIndex(GPRReg reg)
     {
         ASSERT(reg != InvalidGPRReg);
-        ASSERT(reg < 16);
+        ASSERT(static_cast<int>(reg) < 16);
         static const unsigned indexForRegister[16] = { 0, 2, 1, 3, InvalidIndex, InvalidIndex, 5, 4, 6, 7, 8, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex };
         unsigned result = indexForRegister[reg];
         ASSERT(result != InvalidIndex);
@@ -372,7 +372,7 @@
     static const char* debugName(GPRReg reg)
     {
         ASSERT(reg != InvalidGPRReg);
-        ASSERT(reg < 16);
+        ASSERT(static_cast<int>(reg) < 16);
         static const char* nameForRegister[16] = {
             "rax", "rcx", "rdx", "rbx",
             "rsp", "rbp", "rsi", "rdi",

Modified: trunk/Source/_javascript_Core/runtime/JSTypeInfo.h (132751 => 132752)


--- trunk/Source/_javascript_Core/runtime/JSTypeInfo.h	2012-10-28 12:31:04 UTC (rev 132751)
+++ trunk/Source/_javascript_Core/runtime/JSTypeInfo.h	2012-10-28 21:36:50 UTC (rev 132752)
@@ -55,7 +55,7 @@
             , m_flags2(flags >> 8)
         {
             ASSERT(flags <= 0x3ff);
-            ASSERT(type <= 0xff);
+            ASSERT(static_cast<int>(type) <= 0xff);
             ASSERT(type >= CompoundType || !(flags & OverridesVisitChildren));
             // No object that doesn't ImplementsHasInstance should override it!
             ASSERT((m_flags & (ImplementsHasInstance | OverridesHasInstance)) != OverridesHasInstance);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to